mx4j.remote

Interface RemoteNotificationServerHandler

public interface RemoteNotificationServerHandler

Handles remote notification sending on server side. It takes care of collecting requests for listener addition and removal, and to send notifications back to the client side.

Version: $Revision: 1.7 $

See Also: RemoteNotificationClientHandler

Method Summary
voidaddNotificationListener(Integer id, NotificationTuple tuple)
Adds the given tuple with the given listener ID to this handler
NotificationTuple[]close()
Closes this handler, that will not accept anymore add or removal of listeners
NotificationResultfetchNotifications(long sequenceNumber, int maxNotifications, long timeout)
Fetches notifications from the notification buffer in order to send them to the client side
IntegergenerateListenerID(ObjectName name, NotificationFilter filter)
Returns a unique ID for a client-side NotificationListener
NotificationListenergetServerNotificationListener()
Returns the unique server side listener that will represent client-side listeners on MBeans.
NotificationTupleremoveNotificationListener(Integer id)
Removes the listener with the given ID from this handler

Method Detail

addNotificationListener

public void addNotificationListener(Integer id, NotificationTuple tuple)
Adds the given tuple with the given listener ID to this handler

See Also: RemoteNotificationServerHandler

close

public NotificationTuple[] close()
Closes this handler, that will not accept anymore add or removal of listeners

Returns: The NotificationTuples currently held

See Also: RemoteNotificationServerHandler

fetchNotifications

public NotificationResult fetchNotifications(long sequenceNumber, int maxNotifications, long timeout)
Fetches notifications from the notification buffer in order to send them to the client side

Throws: IOException If this handler has already been closed

generateListenerID

public Integer generateListenerID(ObjectName name, NotificationFilter filter)
Returns a unique ID for a client-side NotificationListener

See Also: RemoteNotificationServerHandler

getServerNotificationListener

public NotificationListener getServerNotificationListener()
Returns the unique server side listener that will represent client-side listeners on MBeans.

removeNotificationListener

public NotificationTuple removeNotificationListener(Integer id)
Removes the listener with the given ID from this handler

See Also: RemoteNotificationServerHandler

Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.