org.objectweb.jonas.service
Interface Service

All Known Subinterfaces:
CatalinaJWebContainerService, DataBaseService, DBService, DiscoveryService, EarService, EJBService, HaService, JAXRService, JmsService, JmxService, JWebContainerService, MailService, RegistryService, ResourceService, SecurityService, TransactionService, WebServicesService
All Known Implementing Classes:
AbsJmxServiceImpl, AbsJWebContainerServiceImpl, AbsServiceImpl, AbsWebServicesServiceImpl, CatalinaJWebContainerServiceImpl, CatalinaJWebContainerServiceWrapper, CatalinaJWebContainerServiceWrapper, DataBaseServiceImpl, DiscoveryServiceImpl, EarServiceImpl, EJBServiceImpl, HaServiceImpl, HsqlDBServiceImpl, JAXRServiceImpl, JmsServiceImpl, JonasSecurityServiceImpl, MailServiceImpl, RegistryServiceImpl, ResourceServiceImpl, TransactionServiceImpl

public interface Service

This interface defines a Service. Objects which implement this interface must have a public constructor with a string parameter which is the name of the service.


Method Summary
 java.lang.String getName()
           
 void init(javax.naming.Context ctx)
          Initialize the service
 boolean isStarted()
           
 void setName(java.lang.String name)
          Set the service's name
 void start()
          Start the service
 void stop()
          Stop the service
 

Method Detail

init

public void init(javax.naming.Context ctx)
          throws ServiceException
Initialize the service

Parameters:
ctx - configuration of the service
Throws:
ServiceException - when init fails.

start

public void start()
           throws ServiceException
Start the service

Throws:
ServiceException - when start fails.

stop

public void stop()
          throws ServiceException
Stop the service

Throws:
ServiceException - when stop fails.

isStarted

public boolean isStarted()
Returns:
Returns true if the service is started, false otherwise

setName

public void setName(java.lang.String name)
Set the service's name

Parameters:
name - the service's name

getName

public java.lang.String getName()
Returns:
Returns the service's name