|
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:
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
Nirvana 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:
leafaddListener(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.
nServiceNode Connections
Nirvana provides the ability to issue notifications
of connections to service nodes. Connections to service
nodes correspond to p2p client connections, so when
a user connects to a service or closes the service,
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.
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:
service.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 service connections are made or
closed.
An example of how to monitor
connections programatically can be found here.
For information on monitoring
realm connections using the enterprise manager or
channel/queue
connections please see the enterprise manager guide.
In addition monitor
panels are available to show TOP like functionality
on realm usage.
For more information on Nirvana Administration,
please see the API
documentation, and the Enterprise Manager
Guide.
|