org.glassfish.external.amx
Class MBeanListener.CallbackImpl
java.lang.Object
org.glassfish.external.amx.MBeanListener.CallbackImpl
- All Implemented Interfaces:
- MBeanListener.Callback
- Direct Known Subclasses:
- AMXGlassfish.BootAMXCallback
- Enclosing class:
- MBeanListener<T extends MBeanListener.Callback>
public static class MBeanListener.CallbackImpl
- extends java.lang.Object
- implements MBeanListener.Callback
Default callback implementation, can be subclassed if needed
Remembers only the last MBean that was seen.
Field Summary |
protected java.util.concurrent.CountDownLatch |
mLatch
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mLatch
protected final java.util.concurrent.CountDownLatch mLatch
MBeanListener.CallbackImpl
public MBeanListener.CallbackImpl()
MBeanListener.CallbackImpl
public MBeanListener.CallbackImpl(boolean stopAtFirst)
getRegistered
public javax.management.ObjectName getRegistered()
getUnregistered
public javax.management.ObjectName getUnregistered()
await
public void await()
- Optional: wait for the CountDownLatch to fire
If used, the subclass should countDown() the latch when the
appropriate event happens
mbeanRegistered
public void mbeanRegistered(javax.management.ObjectName objectName,
MBeanListener listener)
- Specified by:
mbeanRegistered
in interface MBeanListener.Callback
mbeanUnregistered
public void mbeanUnregistered(javax.management.ObjectName objectName,
MBeanListener listener)
- Specified by:
mbeanUnregistered
in interface MBeanListener.Callback