站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 3.2.7 varia API Documentation 英文版文档

NotificationListener (Various API) - JBoss 3.2.7 varia API Documentation 英文版文档


org.jboss.monitor.services
Class NotificationListener

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.system.ListenerServiceMBeanSupport
              extended byorg.jboss.monitor.services.NotificationListener
All Implemented Interfaces:
EventListener, org.jboss.system.ListenerServiceMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, javax.management.NotificationListener, NotificationListenerMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class NotificationListener
extends org.jboss.system.ListenerServiceMBeanSupport
implements NotificationListenerMBean

A simple JMX notification listener that outputs notifications as log.INFO messages, and demonstrates the usefulness of ListenerServiceMBeanSupport.

Version:
$Revision: 1.1.2.2 $
Author:
Dimitris Andreadis

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

NotificationListener

public NotificationListener()
CTOR

Method Detail

getNotificationCount

public long getNotificationCount()
Number of notifications received.

Specified by:
getNotificationCount in interface NotificationListenerMBean

setDynamicSubscriptions

public void setDynamicSubscriptions(boolean dynamicSubscriptions)
Enables/disables dynamic subscriptions

Specified by:
setDynamicSubscriptions in interface NotificationListenerMBean

getDynamicSubscriptions

public boolean getDynamicSubscriptions()
Gets the dynamic subscriptions status

Specified by:
getDynamicSubscriptions in interface NotificationListenerMBean

setNotificationListener

public void setNotificationListener(javax.management.ObjectName notificationListener)
Sets listener of notifications

Specified by:
setNotificationListener in interface NotificationListenerMBean

getNotificationListener

public javax.management.ObjectName getNotificationListener()
Gets listener of notifications

Specified by:
getNotificationListener in interface NotificationListenerMBean

startService

public void startService()
                  throws Exception
Start

Throws:
Exception

stopService

public void stopService()
                 throws Exception
Stop

Throws:
Exception

handleNotification2

public void handleNotification2(javax.management.Notification notification,
                                Object handback)
Overriden to add handling!



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.