|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.core.service.Service
org.exolab.core.service.BasicService
public abstract class BasicService
BasicService is a service implementation that will run the service in a separate thread. Derived class must define an implementation for the 'run' method.
Service
,
Serialized FormConstructor Summary | |
---|---|
protected |
BasicService()
The default constructor for the BasicService does nothing. |
protected |
BasicService(java.lang.String name)
Instantiates a service with the specified name |
Method Summary | |
---|---|
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 org.exolab.core.service.Service |
---|
getName, getState, restart, setState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Runnable |
---|
run |
Constructor Detail |
---|
protected BasicService()
protected BasicService(java.lang.String name)
name
- the unique name of the serviceMethod Detail |
---|
public void start() throws ServiceException
start
in interface Serviceable
start
in class Service
ServiceException
- if the service fails to start, or is already
runningpublic void stop() throws ServiceException
stop
in interface Serviceable
stop
in class Service
ServiceException
- if the service fails to stop, or is already
stoppedpublic java.lang.String toString()
toString
in class Service
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |