|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jsr.daemon.GenericDaemon | +--jsr.daemon.pausable.PausableDaemon
abstract pausable daemon base class to be subclassed by pausable daemons All singleton accesses are synchronized via this daemon instance if applicable.
Constructor Summary | |
PausableDaemon()
default constructor for this daemon |
Method Summary | |
protected void |
down(java.lang.Throwable throwable)
method for indicating the activity state of this daemon used by this daemon for managing its own activity state after calling down initialization is required for getting this daemon active again |
protected void |
finalize()
finalizer method for this pausable daemon |
protected DaemonControl |
getDaemonControl()
access to the service provider pausable control interface of this pausable daemon method is called by the container for controlling the life state of this daemon |
protected DaemonEventHandler |
getEventHandler()
method for accessing the event handler of this daemon |
boolean |
isActive()
life state indication of this daemon state is managed by the container and/or by this daemon |
boolean |
isPaused()
life state indication of this daemon state is managed by the container and/or by this daemon |
void |
pause(java.lang.Throwable throwable)
method for indicating the pause state of this daemon used by this daemon for managing its own pause state after calling pause a restart is required for getting this daemon unpaused again |
protected void |
setPaused(boolean paused,
java.lang.Throwable throwable)
method for managing the pause state of this daemon |
abstract void |
start()
start method for this daemon method is launched via the control interface and has to be subclassed |
abstract void |
stop()
pause method for this daemon method is launched via the control interface and has to be subclassed |
Methods inherited from class jsr.daemon.GenericDaemon |
addListener, destroy, getAttribute, getAttributeNames, getDaemonConfig, getDaemonContext, getDaemonInfo, getDaemonName, init, log, log, removeListener, setActive |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jsr.daemon.Daemon |
destroy, getDaemonConfig, getDaemonInfo, init |
Constructor Detail |
public PausableDaemon()
Method Detail |
public abstract void start() throws DaemonException
start
in interface Pausable
DaemonException
- thrown by an implementing daemon if starting or restarting failspublic abstract void stop()
stop
in interface Pausable
protected DaemonControl getDaemonControl()
getDaemonControl
in class GenericDaemon
protected DaemonEventHandler getEventHandler()
getEventHandler
in class GenericDaemon
protected void down(java.lang.Throwable throwable)
down
in class GenericDaemon
throwable
- a throwable for informing listeners about an exception causeprotected final void setPaused(boolean paused, java.lang.Throwable throwable)
paused
- flag indicating the current pause statethrowable
- a throwable for indicating a possible exceptionpublic void pause(java.lang.Throwable throwable)
throwable
- a throwable for indicating a possible exceptionpublic boolean isPaused()
isPaused
in interface Pausable
public boolean isActive()
isActive
in interface Daemon
isActive
in class GenericDaemon
protected void finalize() throws java.lang.Throwable
finalize
in class GenericDaemon
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |