|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpyrasun.eio.services.AbstractEmberService
Abstract implementation of an Ember Service - makes life slightly easier.
| Field Summary |
| Fields inherited from interface pyrasun.eio.services.EmberService |
RUNNING, STOPPED |
| Constructor Summary | |
AbstractEmberService()
|
|
AbstractEmberService(java.lang.String name,
boolean isStoppable,
boolean failureOK)
|
|
| 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. |
abstract void |
start()
Start the service. |
abstract void |
stop()
Stop the service. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractEmberService()
public AbstractEmberService(java.lang.String name,
boolean isStoppable,
boolean failureOK)
| Method Detail |
public void setController(EmberServiceController context)
setController in interface EmberServicepublic EmberServiceController getController()
getController in interface EmberService
public abstract void start()
throws EmberServiceException
start in interface EmberServiceServiceException - if the service fails to start, or is already
running
EmberServiceException
public abstract void stop()
throws EmberServiceException
stop in interface EmberServiceServiceException - if the service fails to stop, or is already
stopped
EmberServiceExceptionpublic int getState()
getState in interface EmberServicepublic java.lang.String getName()
getName in interface EmberServicepublic boolean failureOK()
failureOK in interface EmberServicepublic boolean isStoppable()
isStoppable in interface EmberService
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||