public class JMXFlagDecorator<T extends Serializable> extends Object implements JMXFlagDecoratorMBean, NotificationEmitter
| Modifier and Type | Field and Description |
|---|---|
protected int |
eventCounter |
protected cz.cuni.amis.utils.flag.Flag<T> |
flag |
protected String |
flagName |
protected cz.cuni.amis.utils.flag.FlagListener<T> |
listener |
protected NotificationBroadcasterSupport |
nbs
Support object for sending notifications.
|
protected ObjectName |
source |
| Constructor and Description |
|---|
JMXFlagDecorator(cz.cuni.amis.utils.flag.Flag<T> flag,
ObjectName source,
MBeanServer mbs,
String flagName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback) |
Serializable |
getFlag() |
MBeanNotificationInfo |
getMBeanNotificationInfo() |
MBeanNotificationInfo[] |
getNotificationInfo() |
void |
removeNotificationListener(NotificationListener listener) |
void |
removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback) |
void |
stop()
Stops listening for the flag events.
|
protected cz.cuni.amis.utils.flag.Flag<T extends Serializable> flag
protected ObjectName source
protected int eventCounter
protected String flagName
protected cz.cuni.amis.utils.flag.FlagListener<T extends Serializable> listener
protected NotificationBroadcasterSupport nbs
public JMXFlagDecorator(cz.cuni.amis.utils.flag.Flag<T> flag, ObjectName source, MBeanServer mbs, String flagName) throws MalformedObjectNameException, InstanceAlreadyExistsException, MBeanRegistrationException, NotCompliantMBeanException
flag - Flag to be exposed through JMX.source - MBean or ObjectName of the object where the flag resides.nbs - NotificationBroadcasterSupport through which the events will be send.MalformedObjectNameExceptionInstanceAlreadyExistsExceptionMBeanRegistrationExceptionNotCompliantMBeanExceptionpublic void stop()
public MBeanNotificationInfo getMBeanNotificationInfo()
public Serializable getFlag()
getFlag in interface JMXFlagDecoratorMBeanpublic void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
removeNotificationListener in interface NotificationEmitterListenerNotFoundExceptionpublic void addNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws IllegalArgumentException
addNotificationListener in interface NotificationBroadcasterIllegalArgumentExceptionpublic void removeNotificationListener(NotificationListener listener) throws ListenerNotFoundException
removeNotificationListener in interface NotificationBroadcasterListenerNotFoundExceptionpublic MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo in interface NotificationBroadcasterCopyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.