|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface defines a very simple protocol for process-wide services. A service is nothing more than an object that supports methods like start, stop etc. There is normally only one service object attached to a service name. I suppose by using a start() and stop() method I've now opened myself up to litigation by the JBoss group, who seem to claim ownership of the copyright on those method names :-)
| Field Summary | |
static int |
RUNNING
|
static int |
STOPPED
|
| Method Summary | |
boolean |
failureOK()
If true, a failure of this service should not be considered fatal. |
EmberServiceController |
getController()
Returns the context of the larger container which controls this service. |
java.lang.String |
getName()
Return the name of the service |
int |
getState()
Return the current state of the service |
boolean |
isStoppable()
If true, this service can be stopped and restarted. |
void |
setController(EmberServiceController context)
Defines the context of the larger container which controls this service. |
void |
start()
Start the service. |
void |
stop()
Stop the service. |
| Field Detail |
public static final int RUNNING
public static final int STOPPED
| Method Detail |
public void setController(EmberServiceController context)
public EmberServiceController getController()
public void start()
throws EmberServiceException
ServiceException - if the service fails to start, or is already
running
EmberServiceException
public void stop()
throws EmberServiceException
ServiceException - if the service fails to stop, or is already
stopped
EmberServiceExceptionpublic int getState()
public java.lang.String getName()
public boolean failureOK()
public boolean isStoppable()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||