javax.management.j2ee
Interface ListenerRegistration

All Superinterfaces:
java.io.Serializable

public interface ListenerRegistration
extends java.io.Serializable

Provides the methods to add and remove event listeners to the MEJB component.

Version:
$Revision: 1.1 $
Author:
Laurent Etiemble

Method Summary
 void addNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)
          Add a listener to a registered managed object.
 void removeNotificationListener(javax.management.ObjectName name, javax.management.NotificationListener listener)
          Enables to remove a listener from a registered managed object.
 

Method Detail

addNotificationListener

public void addNotificationListener(javax.management.ObjectName name,
                                    javax.management.NotificationListener listener,
                                    javax.management.NotificationFilter filter,
                                    java.lang.Object handback)
                             throws javax.management.InstanceNotFoundException,
                                    java.rmi.RemoteException
Add a listener to a registered managed object.

Parameters:
name - The name of the managed object on which the listener should be added.
listener - The listener object which will handle the events emitted by the registered managed object.
filter - The filter object. If filter is null, no filtering will be performed before handling events.
handback - An opaque object to be sent back to the listener when a notification is emitted which helps the listener to associate information regarding the MBean emitter. This object cannot be used by the Notification broadcaster object. It should be resent unchanged with the notification to the listener.
Throws:
javax.management.InstanceNotFoundException - The managed object name provided does not match any of the registered managed objects.
java.rmi.RemoteException - a communication exception occurred during the execution of a remote method call.

removeNotificationListener

public void removeNotificationListener(javax.management.ObjectName name,
                                       javax.management.NotificationListener listener)
                                throws javax.management.InstanceNotFoundException,
                                       javax.management.ListenerNotFoundException,
                                       java.rmi.RemoteException
Enables to remove a listener from a registered managed object.

Parameters:
name - The name of the managed object on which the listener should be removed.
listener - The listener object which will handle the events emitted by the registered managed object. This method will remove all the information related to this listener.
Throws:
javax.management.InstanceNotFoundException - The managed object name provided does not match any of the registered managed objects.
javax.management.ListenerNotFoundException - The listener is not registered in the managed object.
java.rmi.RemoteException - A communication exception occurred during the execution of a remote method call.


Copyright © 2002-2003 EJTools Org.. All Rights Reserved.