|
One of the important features of the YAMI4 agent is the ability to report connection-related events to the user. The reported events are:
In order to enable connection event reporting, the user has to provide the callback either at the time the agent is created to the appropriately overloaded agent constructor or by calling a dedicated registering function on the agent. This is done differently in each supported programming language:
Handler
interface defined in the YAMI.Connection_Event_Handlers
package. The callback is registered with a separate operation of the Agent
type.std::string
type and the enumeration representing event kind - has to be registered with a separate function of the agent
class.ConnectionEventCallback
interface and is provided when the agent is constructed.ConnectionsChanged
event.Agent
's constructor.If the callback is installed, the notification is performed within the context of the thread that initiated the event - this might be the user thread for opening outgoing connection, or the internally managed worker thread for opening incoming connections or closing them due to end of stream condition. The user-provided implementation of the callback should therefore not block or delay the execution unnecessarily.