public abstract class MBeanRegistrationListener extends NotificationListenerBase
MBeanServerNotification notifications.
A class extending this class must implement mbeanRegistered(javax.management.ObjectName)
and mbeanUnregistered(javax.management.ObjectName).
The class is designed to start listening upon creation. The caller should call cleanup() when listening is no longer desired. Once cleanup() is called, no further listening can be done; a new MBeanRegistrationListener should be instantiated if further listening is desired.
| Modifier | Constructor and Description |
|---|---|
protected |
MBeanRegistrationListener(String name,
MBeanServerConnection conn)
Calls this( conn, null ).
|
protected |
MBeanRegistrationListener(String name,
MBeanServerConnection conn,
ObjectName constrain)
If 'constrain' is non-null, then all registration and unregistration
events will be filtered through it.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handleNotification(Notification notifIn,
Object handback)
Subclass should implement this routine.
|
protected abstract void |
mbeanRegistered(ObjectName objectName) |
protected abstract void |
mbeanUnregistered(ObjectName objectName) |
checkAlive, cleanup, getConn, getListenees, getMBeanServerConnection, getNotificationFilter, isAlive, listenToIfMatch, listenToMBean, startListeningprotected MBeanRegistrationListener(String name, MBeanServerConnection conn, ObjectName constrain) throws IOException
mbeanRegistered(javax.management.ObjectName)
and mbeanUnregistered(javax.management.ObjectName).conn - constrain - optional fixed or pattern ObjectNameIOExceptionprotected MBeanRegistrationListener(String name, MBeanServerConnection conn) throws IOException
conn - IOExceptionprotected abstract void mbeanRegistered(ObjectName objectName)
protected abstract void mbeanUnregistered(ObjectName objectName)
public void handleNotification(Notification notifIn, Object handback)
NotificationListenerBasehandleNotification in interface NotificationListenerhandleNotification in class NotificationListenerBaseCopyright © 2017. All rights reserved.