|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.exolab.core.service.Service
Service is an implementation of the Servicable interface that
provides default implementations for the start() and stop()
methods.
Serviceable,
Serialized Form| Constructor Summary | |
protected |
Service()
The default constructor for the Service does nothing. |
protected |
Service(java.lang.String name)
Instantiates a service with the specified name |
| Method Summary | |
java.lang.String |
getName()
Return the name of the service. |
ServiceState |
getState()
Return the current state of the service. |
void |
restart()
Convenience method for restarting the service. |
protected void |
setState(ServiceState state)
Set the state of the service |
void |
start()
Start the service. |
void |
stop()
Stop the service. |
java.lang.String |
toString()
Return the state of the object as a string |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected Service()
protected Service(java.lang.String name)
name - the unique name of the service| Method Detail |
public void start()
throws ServiceException
start in interface ServiceableServiceException - if the service fails to start, or is already
running
public void stop()
throws ServiceException
stop in interface ServiceableServiceException - if the service fails to stop, or is already
stopped
public void restart()
throws ServiceException
restart in interface ServiceableServiceException - if the service fails to restartpublic ServiceState getState()
getState in interface Serviceablepublic java.lang.String getName()
getName in interface Serviceablepublic java.lang.String toString()
protected void setState(ServiceState state)
state - the service state
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||