Top Description Methods
javax.management.j2ee

public Interface ListenerRegistration

extends Serializable
Imports
java.rmi.RemoteException, javax.management.NotificationListener, .NotificationFilter, .ObjectName, .InstanceNotFoundException, .ListenerNotFoundException

ListenerRegistration defines the methods which clients of the MEJB use to add and remove event listeners.
Author
Hans Hrasna

Method Summary

Modifier and TypeMethod and Description
public void
addNotificationListener(ObjectName
The name of the managed object on which the listener should be added.
name
,
NotificationListener
The listener object which will handle the notifications emitted by the registered managed object.
listener
,
NotificationFilter
The filter object. If filter is null, no filtering will be performed before handling notifications.
filter
,
Object
The context to be sent to the listener when a notification is emitted.
handback
)

Add a listener to a registered managed object.

public void
removeNotificationListener(ObjectName
The name of the managed object on which the listener should be removed.
name
,
NotificationListener
The listener object which will handle the notifications emitted by the registered managed object. This method will remove all the information related to this listener.
listener
)

Remove a listener from a registered managed object.

Method Detail

addNotificationListenerback to summary
public void addNotificationListener(ObjectName name, NotificationListener listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException, RemoteException

Add a listener to a registered managed object.

Parameters
name:ObjectName

The name of the managed object on which the listener should be added.

listener:NotificationListener

The listener object which will handle the notifications emitted by the registered managed object.

filter:NotificationFilter

The filter object. If filter is null, no filtering will be performed before handling notifications.

handback:Object

The context to be sent to the listener when a notification is emitted.

Exceptions
InstanceNotFoundException:
The managed object name provided does not match any of the registered managed objects.
RemoteException:
A communication exception occurred during the execution of a remote method call
removeNotificationListenerback to summary
public void removeNotificationListener(ObjectName name, NotificationListener listener) throws InstanceNotFoundException, ListenerNotFoundException, RemoteException

Remove a listener from a registered managed object.

Parameters
name:ObjectName

The name of the managed object on which the listener should be removed.

listener:NotificationListener

The listener object which will handle the notifications emitted by the registered managed object. This method will remove all the information related to this listener.

Exceptions
InstanceNotFoundException:
The managed object name provided does not match any of the registered managed objects.
ListenerNotFoundException:
The listener is not registered in the managed object.
RemoteException:
A communication exception occurred during the execution of a remote method call