org.jboss.portal.server.kernel.state
Class StateMachine
java.lang.Object
org.jboss.portal.server.kernel.state.StateMachine
- Direct Known Subclasses:
- ServiceState
public class StateMachine
- extends java.lang.Object
Keep state and take care of transitions.
Constructor Summary |
StateMachine(org.apache.log4j.Logger log)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StateMachine
public StateMachine(org.apache.log4j.Logger log)
getState
public State getState()
register
public void register(boolean test)
throws TransitionNotPossibleException
- Throws:
TransitionNotPossibleException
create
public void create(boolean test)
throws TransitionNotPossibleException
- Throws:
TransitionNotPossibleException
start
public void start(boolean test)
throws TransitionNotPossibleException
- Throws:
TransitionNotPossibleException
stop
public void stop(boolean test)
throws TransitionNotPossibleException
- Throws:
TransitionNotPossibleException
destroy
public void destroy(boolean test)
throws TransitionNotPossibleException
- Throws:
TransitionNotPossibleException
unregister
public void unregister(boolean test)
throws TransitionNotPossibleException
- Throws:
TransitionNotPossibleException
fail
public void fail(boolean test)
throws TransitionNotPossibleException
- Throws:
TransitionNotPossibleException
stateChanged
protected void stateChanged(State oldState,
State newState)