org.ow2.jonas.service
Interface Service

All Known Subinterfaces:
CmiService, DataBaseService, DBService, DiscoveryService, EarService, EJBService, HaService, IEasyBeansService, IJAXRPCService, IJAXWSService, IOnDemandHttpService, JmsService, JmxService, JWebContainerService, MailService, MonitoringService, RegistryService, ResourceMonitorService, ResourceService, SecurityService, SmartclientService, TransactionService, VersioningService, WorkManagerService
All Known Implementing Classes:
AbsDBServiceImpl, AbsServiceImpl, Axis2Service, AxisService, BaseDiscovery, BaseJMXService, BaseWebContainerService, CarolRegistryService, CmiServiceImpl, CXFService, DefaultWSDLPublisherManager, DeployableMonitorService, EasyBeansService, HaServiceImpl, HsqlDBServiceImpl, JAXRPCService, JAXWSService, Jetty6Service, JgroupsDiscoveryServiceImpl, JOnASDataBaseManagerService, JOnASEARService, JOnASEJBService, JOnASJMXService, JOnASMailService, JOnASResourceMonitorService, JOnASResourceService, JonasSecurityServiceImpl, JOnASWorkCleanerService, JOnASWorkManagerService, JOTMTransactionService, MulticastDiscoveryServiceImpl, SmartclientServiceImpl, Tomcat6Service, VersioningServiceImpl

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
 String getName()
           
 void init(Context ctx)
          Deprecated. Replaced in favor of IoC.
 boolean isStarted()
           
 void setName(String name)
          Set the service's name.
 void start()
          Start the service.
 void stop()
          Stop the service.
 

Method Detail

init

@Deprecated
void init(Context ctx)
          throws ServiceException
Deprecated. Replaced in favor of IoC.

Initialize the service.

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

start

void start()
           throws ServiceException
Start the service.

Throws:
ServiceException - when start fails.

stop

void stop()
          throws ServiceException
Stop the service.

Throws:
ServiceException - when stop fails.

isStarted

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

setName

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

Parameters:
name - the service's name

getName

String getName()
Returns:
Returns the service's name


Copyright © 2010 OW2 Consortium. All Rights Reserved.