@Taxonomy(stability=UNCOMMITTED) public class MBeanListener<T extends MBeanListener.Callback> extends Object implements NotificationListener
| Modifier and Type | Class and Description |
|---|---|
static interface |
MBeanListener.Callback
Callback interface.
|
static class |
MBeanListener.CallbackImpl
Default callback implementation, can be subclassed if needed
Remembers only the last MBean that was seen.
|
| Constructor and Description |
|---|
MBeanListener(MBeanServerConnection server,
ObjectName objectName,
T callback)
Listener for a specific MBean.
|
MBeanListener(MBeanServerConnection server,
String domain,
String type,
String name,
T callback)
Listener for MBeans of specified type, with specified name (or any name
if null is passed for the name).
|
MBeanListener(MBeanServerConnection server,
String domain,
String type,
T callback)
Listener for all MBeans of specified type, with or without a name.
|
| Modifier and Type | Method and Description |
|---|---|
T |
getCallback() |
MBeanServerConnection |
getMBeanServer() |
String |
getName() |
String |
getType() |
void |
handleNotification(Notification notifIn,
Object handback) |
void |
startListening()
Start listening.
|
void |
stopListening()
unregister the listener
|
String |
toString() |
public MBeanListener(MBeanServerConnection server, ObjectName objectName, T callback)
startListening() to start listening.server - objectName - callback - public MBeanListener(MBeanServerConnection server, String domain, String type, T callback)
startListening() to start listening.server - type - type of the MBean (as found in the ObjectName)callback - public MBeanListener(MBeanServerConnection server, String domain, String type, String name, T callback)
startListening() to start listening.server - type - type of the MBean (as found in the ObjectName)name - name of the MBean, or null if nonecallback - public String getType()
public String getName()
public MBeanServerConnection getMBeanServer()
public T getCallback()
public void startListening()
public void stopListening()
public void handleNotification(Notification notifIn, Object handback)
handleNotification in interface NotificationListenerCopyright © 2017-2019 Eclipse Foundation. All Rights Reserved.