|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.external.amx.MBeanListener<T>
@Taxonomy(stability=UNCOMMITTED) public class MBeanListener<T extends MBeanListener.Callback>
Listens for registration of MBeans of various types. Intended usage is for subsystems to lazy-load only when the Parent MBean is registered.
| Nested Class Summary | |
|---|---|
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 Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MBeanListener(MBeanServerConnection server,
ObjectName objectName,
T callback)
#start to start listening.
server - objectName - callback -
public MBeanListener(MBeanServerConnection server,
String domain,
String type,
T callback)
#start 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)
#start to start listening.
server - type - type of the MBean (as found in the ObjectName)name - name of the MBean, or null if nonecallback - | Method Detail |
|---|
public String toString()
toString in class Objectpublic 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 NotificationListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||