org.objectweb.jonas.service
Class AbsServiceImpl

java.lang.Object
  |
  +--org.objectweb.jonas.service.AbsServiceImpl
All Implemented Interfaces:
Service
Direct Known Subclasses:
AbsDynamicServiceImpl, AbsJmxServiceImpl, DataBaseServiceImpl, EarServiceImpl, EJBServiceImpl, JmsServiceImpl, JonasSecurityServiceImpl, MailServiceImpl, RegistryServiceImpl, ResourceServiceImpl, TransactionServiceImpl

public abstract class AbsServiceImpl
extends java.lang.Object
implements Service


Constructor Summary
AbsServiceImpl()
           
 
Method Summary
protected abstract  void doInit(javax.naming.Context ctx)
           
protected abstract  void doStart()
           
protected abstract  void doStop()
           
 java.lang.String getName()
          Returns the service's name
 void init(javax.naming.Context ctx)
          Initialize the service
 boolean isStarted()
          Returns true if the service is started, false otherwise
 void setName(java.lang.String name)
          Set the service's name
 void start()
          Start the service
 void stop()
          Stop the service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsServiceImpl

public AbsServiceImpl()
Method Detail

init

public void init(javax.naming.Context ctx)
          throws ServiceException
Initialize the service
Specified by:
init in interface Service
Parameters:
ctx - configuration of the service

start

public void start()
           throws ServiceException
Start the service
Specified by:
start in interface Service

stop

public void stop()
          throws ServiceException
Stop the service
Specified by:
stop in interface Service

isStarted

public boolean isStarted()
Returns true if the service is started, false otherwise
Specified by:
isStarted in interface Service

getName

public java.lang.String getName()
Returns the service's name
Specified by:
getName in interface Service

setName

public void setName(java.lang.String name)
Set the service's name
Specified by:
setName in interface Service

doInit

protected abstract void doInit(javax.naming.Context ctx)
                        throws ServiceException

doStart

protected abstract void doStart()
                         throws ServiceException

doStop

protected abstract void doStop()
                        throws ServiceException