org.objectweb.jass.hls.ont.jboss
Class ONTService

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.objectweb.jass.hls.ont.jboss.ONTService
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.naming.spi.ObjectFactory, ONTServiceMBean, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class ONTService
extends org.jboss.system.ServiceMBeanSupport
implements ONTServiceMBean, javax.naming.spi.ObjectFactory

MBean that creates the ONT service for the JBOSS application server.

Author:
fran Date: Feb 11, 2004 org.objectweb.jass.hls.ont.jbossONTService.java

Field Summary
static java.lang.String ONT_JNDI_NAME
           
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, STARTED, STARTING, states, STOPPED, STOPPING
 
Constructor Summary
ONTService()
           
 
Method Summary
 java.lang.Object getObjectInstance(java.lang.Object obj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable environment)
          It returns the unique ONT service instance when the service is requested.
 ONT getONT()
          It returns the singleton ONT instance to the JBOSS-JMX.
 void startService()
          Invoked when this JBOSS MBean is started.
 void stopService()
          Invoked when this JBOSS MBean is stopped.
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getLog, getName, getServer, getServiceName, getState, getStateString, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

ONT_JNDI_NAME

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

ONTService

public ONTService()
Method Detail

startService

public void startService()
                  throws java.lang.Exception
Invoked when this JBOSS MBean is started.

Throws:
java.lang.Exception

stopService

public void stopService()
Invoked when this JBOSS MBean is stopped.


getObjectInstance

public java.lang.Object getObjectInstance(java.lang.Object obj,
                                          javax.naming.Name name,
                                          javax.naming.Context nameCtx,
                                          java.util.Hashtable environment)
                                   throws java.lang.Exception
It returns the unique ONT service instance when the service is requested.

Specified by:
getObjectInstance in interface javax.naming.spi.ObjectFactory
Throws:
java.lang.Exception

getONT

public ONT getONT()
It returns the singleton ONT instance to the JBOSS-JMX.

Specified by:
getONT in interface ONTServiceMBean
Returns:
the ONT singleton.