|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.JBossNotificationBroadcasterSupport org.jboss.system.ServiceMBeanSupport org.jboss.system.ListenerServiceMBeanSupport org.jboss.monitor.services.NotificationListener
A simple JMX notification listener that outputs notifications as log.INFO messages, and demonstrates the usefulness of ListenerServiceMBeanSupport.
Nested Class Summary |
Nested classes inherited from class org.jboss.system.ListenerServiceMBeanSupport |
org.jboss.system.ListenerServiceMBeanSupport.SubscriptionInfo |
Field Summary |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ListenerServiceMBean |
SL_MBEAN_ELEMENT, SL_MBEAN_HANDBACK_ATTRIBUTE, SL_MBEAN_NAME_ATTRIBUTE, SL_NOTIFICATION_ELEMENT, SL_NOTIFICATION_TYPE_ATTRIBUTE, SL_ROOT_ELEMENT |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Constructor Summary | |
NotificationListener()
CTOR |
Method Summary | |
boolean |
getDynamicSubscriptions()
Gets the dynamic subscriptions status |
long |
getNotificationCount()
Number of notifications received. |
javax.management.ObjectName |
getNotificationListener()
Gets listener of notifications |
void |
handleNotification2(javax.management.Notification notification,
Object handback)
Overriden to add handling! |
void |
setDynamicSubscriptions(boolean dynamicSubscriptions)
Enables/disables dynamic subscriptions |
void |
setNotificationListener(javax.management.ObjectName notificationListener)
Sets listener of notifications |
void |
startService()
Start |
void |
stopService()
Stop |
Methods inherited from class org.jboss.system.ListenerServiceMBeanSupport |
handleNotification, setSubscriptionList, subscribe, subscribe, subscribe, unsubscribe |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jboss.system.ListenerServiceMBean |
setSubscriptionList |
Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
Constructor Detail |
public NotificationListener()
Method Detail |
public long getNotificationCount()
getNotificationCount
in interface NotificationListenerMBean
public void setDynamicSubscriptions(boolean dynamicSubscriptions)
setDynamicSubscriptions
in interface NotificationListenerMBean
public boolean getDynamicSubscriptions()
getDynamicSubscriptions
in interface NotificationListenerMBean
public void setNotificationListener(javax.management.ObjectName notificationListener)
setNotificationListener
in interface NotificationListenerMBean
public javax.management.ObjectName getNotificationListener()
getNotificationListener
in interface NotificationListenerMBean
public void startService() throws Exception
Exception
public void stopService() throws Exception
Exception
public void handleNotification2(javax.management.Notification notification, Object handback)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |