Package 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 Object implements MBeanListener.Callback
Default callback implementation, can be subclassed if needed Remembers only the last MBean that was seen.
-
-
Field Summary
Fields Modifier and Type Field Description protected CountDownLatchmLatch
-
Constructor Summary
Constructors Constructor Description CallbackImpl()CallbackImpl(boolean stopAtFirst)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidawait()Optional: wait for the CountDownLatch to fire If used, the subclass should countDown() the latch when the appropriate event happensObjectNamegetRegistered()ObjectNamegetUnregistered()voidmbeanRegistered(ObjectName objectName, MBeanListener listener)voidmbeanUnregistered(ObjectName objectName, MBeanListener listener)
-
-
-
Field Detail
-
mLatch
protected final CountDownLatch mLatch
-
-
Method Detail
-
getRegistered
public ObjectName getRegistered()
-
getUnregistered
public 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(ObjectName objectName, MBeanListener listener)
- Specified by:
mbeanRegisteredin interfaceMBeanListener.Callback
-
mbeanUnregistered
public void mbeanUnregistered(ObjectName objectName, MBeanListener listener)
- Specified by:
mbeanUnregisteredin interfaceMBeanListener.Callback
-
-