org.squirrelframework.foundation.fsm
Interface ImmutableTransition<T extends StateMachine<T,S,E,C>,S,E,C>

Type Parameters:
T - type of State Machine
S - type of State
E - type of Event
C - type of Context
All Superinterfaces:
SquirrelComponent, Visitable
All Known Subinterfaces:
MutableTransition<T,S,E,C>

public interface ImmutableTransition<T extends StateMachine<T,S,E,C>,S,E,C>
extends Visitable, SquirrelComponent

Transition A directed relationship between two states which represents the complete response of a state machine to an occurrence of an event of a particular type.

Condition A constraint which must evaluate to true after the trigger occurs in order for the transition to complete.

Transition Action An activity which is executed when performing a certain transition.

Trigger(Event) A triggering activity that causes a transition to occur.

Author:
Henry.He

Method Summary
 List<Action<T,S,E,C>> getActions()
           
 Condition<C> getCondition()
           
 E getEvent()
           
 int getPriority()
           
 ImmutableState<T,S,E,C> getSourceState()
           
 ImmutableState<T,S,E,C> getTargetState()
           
 TransitionType getType()
           
 void internalFire(StateContext<T,S,E,C> stateContext)
          Notify transition when receiving event
 boolean isMatch(S fromState, S toState, E event, int priority)
           
 boolean isMatch(S fromState, S toState, E event, int priority, Class<?> condClazz, TransitionType type)
           
 ImmutableState<T,S,E,C> transit(StateContext<T,S,E,C> stateContext)
          Execute transition under state context
 void verify()
          Verify tranistion correctness
 
Methods inherited from interface org.squirrelframework.foundation.fsm.Visitable
accept
 

Method Detail

getSourceState

ImmutableState<T,S,E,C> getSourceState()
Returns:
Transition source state

getTargetState

ImmutableState<T,S,E,C> getTargetState()
Returns:
Transition destination state

getActions

List<Action<T,S,E,C>> getActions()
Returns:
Transition action list

transit

ImmutableState<T,S,E,C> transit(StateContext<T,S,E,C> stateContext)
Execute transition under state context

Parameters:
stateContext -
Returns:
state when transition finished

getCondition

Condition<C> getCondition()
Returns:
Condition of the transition

getEvent

E getEvent()
Returns:
Event that can trigger the transition

getType

TransitionType getType()
Returns:
type of transition

getPriority

int getPriority()

isMatch

boolean isMatch(S fromState,
                S toState,
                E event,
                int priority)

isMatch

boolean isMatch(S fromState,
                S toState,
                E event,
                int priority,
                Class<?> condClazz,
                TransitionType type)

internalFire

void internalFire(StateContext<T,S,E,C> stateContext)
Notify transition when receiving event

Parameters:
stateContext -

verify

void verify()
Verify tranistion correctness



Copyright © 2013-2014. All Rights Reserved.