|
Class SyncManagedExecutable
|
SyncManagedExecutable will transition the executable to the target state
state and invoke the abstract method to initiate process of transitioning
the executable to the target state.
NOTE: Synchronous executables are assumed to have achieved their target
state on return from the initiating function. As such, implementations of
SyncManagedExecutable do NOT need to indicate that they have reached their
target state. The SyncManagedExecutable will provide the appropriate
notifications when the executable returns from its overriden method.
extending SyncManagedExecutable requires implementations for the following
methods:
doStart(): perform executable startupdoStop(): perform executable stopdoRestart(): perform executable restartdoShutdown(): perform executable graceful shutdowndoSuspend(): perform suspension of executiondoResume(): perform resuming of execution
NOTE: If the implementation throws and exception during itsdo...() method, AsyncManagedExecutable will automatically
transition to exectuable to ERROR and rethrow the exception.
NOTE: the SyncManagedExecutable implementation has a default
implementation for doSuspend, doResume and doRestart that throw an ExecutableException
indicating that the suspend/resume/restart operation is not supported
SyncManagedExecutable will transition the executable to the target state
state and invoke the abstract method to initiate process of transitioning
the executable to the target state.
NOTE: Synchronous executables are assumed to have achieved their target
state on return from the initiating function. As such, implementations of
SyncManagedExecutable do NOT need to indicate that they have reached their
target state. The SyncManagedExecutable will provide the appropriate
notifications when the executable returns from its overriden method.
extending SyncManagedExecutable requires implementations for the following
methods:
doStart(): perform executable startupdoStop(): perform executable stopdoRestart(): perform executable restartdoShutdown(): perform executable graceful shutdowndoSuspend(): perform suspension of executiondoResume(): perform resuming of execution
NOTE: If the implementation throws and exception during itsdo...() method, AsyncManagedExecutable will automatically
transition to exectuable to ERROR and rethrow the exception.
NOTE: the SyncManagedExecutable implementation has a default
implementation for doSuspend, doResume and doRestart that throw an ExecutableException
indicating that the suspend/resume/restart operation is not supported
| Field Summary | |
|---|---|
private final static String |
|
private String |
|
private List |
|
private static Logger |
|
private ExecState |
|
| Method Summary | |
|---|---|
public synchronized void |
addListener(ManagedExecutableListener listener) |
protected void |
|
protected void |
doResume() |
protected abstract void |
|
protected abstract void |
doStart() |
protected abstract void |
doStop() |
protected void |
|
public synchronized ExecState |
getState() |
public synchronized void |
removeListener(ManagedExecutableListener listener) |
public synchronized void |
resume() |
private void |
|
public synchronized void |
shutdown() |
public synchronized void |
start() |
public synchronized void |
stop() |
public synchronized void |
suspend() |