org.apache.lenya.cms.usecase
Class StateMachine

java.lang.Object
  extended by org.apache.lenya.cms.usecase.StateMachine

public class StateMachine
extends java.lang.Object

A simple state machine.


Nested Class Summary
static class StateMachine.Model
          A state machine model.
static class StateMachine.Transition
          A transition switches from a source state to a destination state if an event is invoked.
 
Constructor Summary
StateMachine(StateMachine.Model model)
           
 
Method Summary
protected  boolean canFire(StateMachine.Transition t, java.lang.String event)
           
protected  void checkTransition(java.lang.String event, StateMachine.Transition transition)
           
protected  StateMachine.Transition getTransition(java.lang.String event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateMachine

public StateMachine(StateMachine.Model model)
Parameters:
model - The model to use.
Method Detail

getTransition

protected StateMachine.Transition getTransition(java.lang.String event)

canFire

protected boolean canFire(StateMachine.Transition t,
                          java.lang.String event)

checkTransition

protected void checkTransition(java.lang.String event,
                               StateMachine.Transition transition)


Copyright $ Apache Software Foundation. All Rights Reserved.