org.objectweb.jonas.jmx
Class AbsJmxServiceImpl

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport
      extended byorg.objectweb.jonas.management.ReconfigDispatcher
          extended byorg.objectweb.jonas.service.AbsServiceImpl
              extended byorg.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

Author:
Guillaume Riviere Contributor(s): Michel Bruno, Adriana Danes

Field Summary
static java.lang.String CLASS
           
protected  java.lang.String domainName
           
protected  javax.management.MBeanServer jmxServer
           
protected  javax.management.remote.JMXServiceURL[] jmxServiceUrl
           
protected  java.lang.String jonasName
           
protected static org.objectweb.util.monolog.api.Logger logger
           
protected  java.lang.String rmiConnectorName
           
 
Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Constructor Summary
AbsJmxServiceImpl()
           
 
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
 java.lang.String getDomainName()
          Return the domain's name of this service.
 javax.management.MBeanServer getJmxServer()
           
 java.lang.String getRmiConnectorName()
           
 java.lang.String getServerName()
           
protected  void releaseJmxServer()
          Remove internal references to the MBeanServer.
 
Methods inherited from class org.objectweb.jonas.service.AbsServiceImpl
getJonasServerName, getName, init, isStarted, setName, start, stop
 
Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher
addNotificationListener, getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification
 
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
 
Methods inherited from interface org.objectweb.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Field Detail

logger

protected static org.objectweb.util.monolog.api.Logger logger

jonasName

protected java.lang.String jonasName

domainName

protected java.lang.String domainName

rmiConnectorName

protected java.lang.String rmiConnectorName

jmxServer

protected javax.management.MBeanServer jmxServer

jmxServiceUrl

protected javax.management.remote.JMXServiceURL[] jmxServiceUrl

CLASS

public static final java.lang.String CLASS
See Also:
Constant Field Values
Constructor Detail

AbsJmxServiceImpl

public AbsJmxServiceImpl()
Method Detail

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 - configuration of the service
Throws:
ServiceException - service initialization failed

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 - service start-up failed

doStop

public abstract void doStop()
                     throws ServiceException
Stop this service

Specified by:
doStop in class AbsServiceImpl
Throws:
ServiceException - service stopping failed

getJmxServer

public javax.management.MBeanServer getJmxServer()
Specified by:
getJmxServer in interface JmxService
Returns:
The reference of the MBean server

getRmiConnectorName

public java.lang.String getRmiConnectorName()
Specified by:
getRmiConnectorName in interface JmxService
Returns:
The name of the MBean server's rmi connector

getServerName

public java.lang.String getServerName()
Specified by:
getServerName in interface JmxService
Returns:
The name of the JOnAS server

getDomainName

public java.lang.String getDomainName()
Description copied from class: AbsServiceImpl
Return the domain's name of this service.

Specified by:
getDomainName in interface JmxService
Overrides:
getDomainName in class AbsServiceImpl
Returns:
The name of the management domain

releaseJmxServer

protected void releaseJmxServer()
Remove internal references to the MBeanServer.