org.glassfish.external.amx
Class MBeanListener.CallbackImpl

java.lang.Object
  extended by 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
           
 
Constructor Summary
MBeanListener.CallbackImpl()
           
MBeanListener.CallbackImpl(boolean stopAtFirst)
           
 
Method Summary
 void await()
          Optional: wait for the CountDownLatch to fire If used, the subclass should countDown() the latch when the appropriate event happens
 javax.management.ObjectName getRegistered()
           
 javax.management.ObjectName getUnregistered()
           
 void mbeanRegistered(javax.management.ObjectName objectName, MBeanListener listener)
           
 void mbeanUnregistered(javax.management.ObjectName objectName, MBeanListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mLatch

protected final java.util.concurrent.CountDownLatch mLatch
Constructor Detail

MBeanListener.CallbackImpl

public MBeanListener.CallbackImpl()

MBeanListener.CallbackImpl

public MBeanListener.CallbackImpl(boolean stopAtFirst)
Method Detail

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