org.objectweb.jonas.jmx
Class AbsJmxServiceImpl
java.lang.Object
javax.management.NotificationBroadcasterSupport
org.objectweb.jonas.management.ReconfigDispatcher
org.objectweb.jonas.service.AbsServiceImpl
org.objectweb.jonas.jmx.AbsJmxServiceImpl
- All Implemented Interfaces:
- JmxService, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, ReconfigDispatcherMBean, Service
- Direct Known Subclasses:
- JmxServiceImpl
- public abstract class AbsJmxServiceImpl
- extends AbsServiceImpl
- implements JmxService
JMX Service implementation. This singleton class must exist in each jonas
server that is to be administered via JMX. Its main role is to initialize the
service (the singleton object).
- Author:
- Guillaume Riviere, Michel Bruno, Adriana Danes
Method Summary |
void |
doInit(javax.naming.Context ctx)
Init the Service. |
abstract void |
doStart()
Start the Service Initialization of the service is already done. |
abstract void |
doStop()
Stop this service |
abstract javax.management.remote.JMXServiceURL[] |
getConnectorServerURLs()
|
javax.management.MBeanServer |
getJmxServer()
|
protected static org.objectweb.util.monolog.api.Logger |
getLogger()
|
void |
registerMBean(java.lang.Object mbean,
java.lang.String objectName)
Register an MBean on the JOnAS mbeanServer |
protected void |
releaseJmxServer()
Remove internal references to the MBeanServer. |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
handleNotification, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbsJmxServiceImpl
public AbsJmxServiceImpl()
getLogger
protected static org.objectweb.util.monolog.api.Logger getLogger()
- Returns:
- Logger logger object
doInit
public void doInit(javax.naming.Context ctx)
throws ServiceException
- Init the Service. Create the MBeanServer. Configuration information is
passed through a Context object.
- Specified by:
doInit
in class AbsServiceImpl
- Parameters:
ctx
- context containing service initilaisation parameters
- Throws:
ServiceException
- the service could not be initialized
doStart
public abstract void doStart()
throws ServiceException
- Start the Service Initialization of the service is already done.
- Specified by:
doStart
in class AbsServiceImpl
- Throws:
ServiceException
- the service could not be started
doStop
public abstract void doStop()
throws ServiceException
- Stop this service
- Specified by:
doStop
in class AbsServiceImpl
- Throws:
ServiceException
- the service could not be stopped
getConnectorServerURLs
public abstract javax.management.remote.JMXServiceURL[] getConnectorServerURLs()
- Specified by:
getConnectorServerURLs
in interface JmxService
- Returns:
- Array containing the adresses associated to the JMX connector servers
getJmxServer
public javax.management.MBeanServer getJmxServer()
- Specified by:
getJmxServer
in interface JmxService
- Returns:
- The local reference of the MBean server
registerMBean
public void registerMBean(java.lang.Object mbean,
java.lang.String objectName)
- Register an MBean on the JOnAS mbeanServer
- Specified by:
registerMBean
in interface JmxService
- Parameters:
mbean
- objectName
-
releaseJmxServer
protected void releaseJmxServer()
- Remove internal references to the MBeanServer.