Universal Messaging 10.11 | Administration Guide | Universal Messaging Administration API | Management Information | Connection Information
 
Connection Information
Universal Messaging's admin API provides real time asynchronous information on all objects within a realm server. By creating an nRealmNode (see nRealmNode), and connecting to a realm, information is automatically delivered to the realm node from the realm. This information is delivered periodically in summary form, and also as and when the state changes for one or all of the objects managed within a realm.
Before reading this section it may be useful to look at the management information available via the Universal Messaging enterprise manager. A full description of all Realm management screens is available in the enterprise manager guide. All functionality seen in the enterprise manager can be easily added to bespoke admin and monitoring processes as it is written entirely using the Universal Messaging Admin API.
This section will discuss the connection information that is available through the nAdmin API for the nRealmNode and the nLeafNode objects:
nRealmNode Connections
The nRealmNode provides the ability to be notified of connections to the realm, and when connections are closed. When a client attempts a connection, a callback will be made that gives the details of the connection, such as the user name, hostname, protocol and connection id. When a user connection is closed, again, you will receive notification. This information can be useful for monitoring activity on a realm.
In order to receive this kind of information, you need to implement the nConnectionListener class. This class defines 2 methods, newConnection and delConnection. To receive notifications, you can use the following method:
Java, C#, C++:
realm.addConnectionListener(this);
Assuming 'this' is the instance of the class implementing nConnectionListener, then the implementation of the newConnection and delConnection methods will be notified when connections are made or closed with the realm.
nLeafNode Connections
Universal Messaging provides the ability to issue notifications of connections to leaf nodes. Connections to leaf nodes correspond to subscriptions on a channel, so when a user subscribes to a channel or removes the subscription, you can be notified. Notification is via a callback that contains the details of the connection, such as the user name, hostname, protocol, connection id, durable name and subscription filter.
In order to receive this kind of information, you need to implement the nConnectionListener class. This class defines 2 methods, newConnection and delConnection. To receive notifications, you can use the following method:
Java, C#:
leafaddListener(this);
C++:
leaf->addListener(this);
Assuming 'this' is the instance of the class implementing nConnectionListener, then the implementation of the newConnection and delConnection methods will be notified when channel subscriptions are made or removed.