org.objectweb.jonas.ws.base.mbean
Class AbstractWebServiceMBean

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
          extended by org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
              extended by org.objectweb.jonas.ws.base.mbean.AbstractWebServiceMBean
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter
Direct Known Subclasses:
Handler, PortComponent, Service

public abstract class AbstractWebServiceMBean
extends J2EEManagedObject

Base Class for WebServices MBeans. It makes registration/unregistration of hierarchical MBeans very easy. Needs to be subclassed for each WebService MBean.

Author:
Guillaume Sauthier

Field Summary
 
Fields inherited from class org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
J2EE_TYPE_APPLICATION, J2EE_TYPE_SERVER, NAME
 
Fields inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
AbstractWebServiceMBean(String objectName)
          Constructor for default J2eeManagedObject
 
Method Summary
protected abstract  List getChildsMBeans()
           
protected abstract  String getMBeanType()
           
 ObjectName getRealObjectName()
           
 void register()
          Registers the MBean (and its childs) in the default MBeanServer
 void register(JmxService jmx)
          Registers the MBean (and its childs) in the specified MBeanServer
 void unregister()
          Unregisters the MBean (and its childs) from the default MBeanServer
 void unregister(JmxService jmx)
          Unregisters the MBean (and its childs) from the specified MBeanServer
 
Methods inherited from class org.objectweb.jonas.management.j2eemanagement.J2EEManagedObject
getObjectName, isEventProvider, isStateManageable, isStatisticsProvider
 
Methods inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
initLogger, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractWebServiceMBean

public AbstractWebServiceMBean(String objectName)
Constructor for default J2eeManagedObject

Parameters:
objectName - the MBean's ObjectName
Method Detail

register

public void register()
Registers the MBean (and its childs) in the default MBeanServer


register

public void register(JmxService jmx)
Registers the MBean (and its childs) in the specified MBeanServer

Parameters:
jmx - reference on the jmx service which allows registering of MBeans

getMBeanType

protected abstract String getMBeanType()
Returns:
Returns the MBean type (as used in mbean-descriptor.xml)

unregister

public void unregister()
Unregisters the MBean (and its childs) from the default MBeanServer


unregister

public void unregister(JmxService jmx)
Unregisters the MBean (and its childs) from the specified MBeanServer

Parameters:
jmx - reference on the jmx service which allows unregistering of MBeans

getChildsMBeans

protected abstract List getChildsMBeans()
Returns:
Returns the Child List

getRealObjectName

public ObjectName getRealObjectName()
Returns:
Returns the ObjectName instance


Copyright © 2007 OW2 Consortium. All Rights Reserved.