|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.exolab.jms.service.Service
Service is an implementation of the Serviceable
interface that provides default implementations for the start() and
stop() methods.
Serviceable| Constructor Summary | |
|
Service()
Construct a new Service, with no name. |
protected |
Service(java.lang.String name)
Construct a new Service, specifying its name. |
| Method Summary | |
protected void |
doStart()
Start the service. |
protected void |
doStop()
Stop the service. |
java.lang.String |
getName()
Return the name of the service. |
boolean |
isStarted()
Determines if this service is started. |
void |
restart()
Convenience method for restarting 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 |
public Service()
Service, with no name.protected Service(java.lang.String name)
Service, specifying its name.name - the name of the service. May be null| Method Detail |
public void start()
throws ServiceException
start in interface ServiceableServiceException - if the service fails to start, or is already
started
public void stop()
throws ServiceException
stop in interface ServiceableServiceException - if the service fails to stop, or is already
stopped
public void restart()
throws ServiceException
ServiceException - if the service fails to restartpublic boolean isStarted()
true if the service is started;
otherwise falsepublic java.lang.String getName()
null if none was set.public java.lang.String toString()
toString in class java.lang.Object
protected void doStart()
throws ServiceException
ServiceException - if the service fails to start
protected void doStop()
throws ServiceException
ServiceException - if the service fails to stop
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||