## mx4j.remote
Interface RemoteNotificationServerHandler

All Known Implementing Classes:
  DefaultRemoteNotificationServerHandler

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
`void` `addNotificationListener(java.lang.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
`javax.management.remote.NotificationResult` `fetchNotifications(long sequenceNumber, int maxNotifications, long timeout)` Fetches notifications from the notification buffer in order to send them to the client side
`java.lang.Integer` `generateListenerID(javax.management.ObjectName name, javax.management.NotificationFilter filter)` Returns a unique ID for a client-side NotificationListener
`javax.management.NotificationListener` `getServerNotificationListener()` Returns the unique server side listener that will represent client-side listeners on MBeans.
`NotificationTuple` `removeNotificationListener(java.lang.Integer id)` Removes the listener with the given ID from this handler

Method Detail

### generateListenerID

    public java.lang.Integer generateListenerID(javax.management.ObjectName name,
                                                javax.management.NotificationFilter filter)

  Returns a unique ID for a client-side NotificationListener

  See Also:
    `addNotificationListener(java.lang.Integer, mx4j.remote.NotificationTuple)`

### getServerNotificationListener

    public javax.management.NotificationListener getServerNotificationListener()

  Returns the unique server side listener that will represent client-side listeners on MBeans.

### addNotificationListener

    public void addNotificationListener(java.lang.Integer id,
                                        NotificationTuple tuple)

  Adds the given tuple with the given listener ID to this handler

  See Also:
    `removeNotificationListener(java.lang.Integer)`

### removeNotificationListener

    public NotificationTuple removeNotificationListener(java.lang.Integer id)

  Removes the listener with the given ID from this handler

  See Also:
    `addNotificationListener(java.lang.Integer, mx4j.remote.NotificationTuple)`

### fetchNotifications

    public javax.management.remote.NotificationResult fetchNotifications(long sequenceNumber,
                                                                         int maxNotifications,
                                                                         long timeout)
                                                                  throws java.io.IOException

  Fetches notifications from the notification buffer in order to send them to the client side

  Throws:
    `java.io.IOException` - If this handler has already been closed

### close

    public NotificationTuple[] close()

  Closes this handler, that will not accept anymore add or removal of listeners

  Returns:
    The NotificationTuples currently held
  See Also:
    `fetchNotifications(long, int, long)`

Copyright © 2001-2003 MX4J Team. All Rights Reserved.