org.jboss.portal.server.kernel.state
Class StateMachine

java.lang.Object
  extended by 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)
           
 
Method Summary
 void create(boolean test)
           
 void destroy(boolean test)
           
 void fail(boolean test)
           
 State getState()
           
 void register(boolean test)
           
 void start(boolean test)
           
protected  void stateChanged(State oldState, State newState)
           
 void stop(boolean test)
           
 void unregister(boolean test)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateMachine

public StateMachine(org.apache.log4j.Logger log)
Method Detail

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)