org.squirrelframework.foundation.fsm
Interface Action<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
All Known Implementing Classes:
ActionWrapper, AnonymousAction, MethodCallActionImpl, MethodCallActionProxyImpl, UntypedAnonymousAction

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

An activity that is executed during transition happening.

Author:
Henry.He

Field Summary
static int AFTER_WEIGHT
           
static int BEFORE_WEIGHT
           
static Action DUMMY_ACTION
           
static int EXTENSION_WEIGHT
           
static int IGNORE_WEIGHT
           
static int MAX_WEIGHT
           
static int MIN_WEIGHT
           
static int NORMAL_WEIGHT
           
 
Method Summary
 void execute(S from, S to, E event, C context, T stateMachine)
          Execute the activity.
 boolean isAsync()
           
 String name()
           
 long timeout()
           
 int weight()
           
 

Field Detail

MAX_WEIGHT

static final int MAX_WEIGHT
See Also:
Constant Field Values

BEFORE_WEIGHT

static final int BEFORE_WEIGHT
See Also:
Constant Field Values

NORMAL_WEIGHT

static final int NORMAL_WEIGHT
See Also:
Constant Field Values

EXTENSION_WEIGHT

static final int EXTENSION_WEIGHT
See Also:
Constant Field Values

AFTER_WEIGHT

static final int AFTER_WEIGHT
See Also:
Constant Field Values

MIN_WEIGHT

static final int MIN_WEIGHT
See Also:
Constant Field Values

IGNORE_WEIGHT

static final int IGNORE_WEIGHT
See Also:
Constant Field Values

DUMMY_ACTION

static final Action DUMMY_ACTION
Method Detail

execute

void execute(S from,
             S to,
             E event,
             C context,
             T stateMachine)
Execute the activity.

Parameters:
from - transition source state
to - transition target state
event - event that trigger the transition
context - context object
stateMachine - the state machine

name

String name()

weight

int weight()

isAsync

boolean isAsync()

timeout

long timeout()


Copyright © 2013-2014. All Rights Reserved.