public abstract class OutOfStateHandlerImp extends java.lang.Object implements OutOfStateHandler
Abstract implementation of the OutOfStateHandler
.
All extending classes will be expected to "setup" by configuring the expected (correct) state. If this is not configured, then we will auto-populate the expected state to be "STARTED".
The valid states are the following; "STARTED", "STOPPED", "CLOSED" and "INITIALISED".
Extending classes will only need to implement the handleOutOfState method.
Constructor and Description |
---|
OutOfStateHandlerImp() |
Modifier and Type | Method and Description |
---|---|
ConfiguredComponentState |
getCorrectState() |
boolean |
isInCorrectState(StateManagedComponent component) |
void |
setCorrectState(ConfiguredComponentState state) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleOutOfState
public boolean isInCorrectState(StateManagedComponent component) throws OutOfStateException
isInCorrectState
in interface OutOfStateHandler
OutOfStateException
public ConfiguredComponentState getCorrectState()
public void setCorrectState(ConfiguredComponentState state)