01 /*
02 * Created on May 14, 2007
03 */
04 package com.x8ing.lsm4j;
05
06 import java.util.List;
07
08 import com.x8ing.lsm4j.state.ProcessableState;
09
10 /**
11 * An Action implements the logic that should be processed if the graph reach a
12 * certain point. An action can be attached to state or optionally to a
13 * transition.
14 * <p>
15 * The optional StateMetaInformation can be retrieved from {@link ProcessableState#getStateMetaInformation()}.
16 *
17 * @author Patrick Heusser
18 */
19 public interface Action {
20
21 /**
22 * Will be invoked to process the current state.
23 *
24 * @param currentState
25 * @param stateContext
26 * @param previousCondition
27 * @param lastVisitedStatesHistory
28 * Contains the last visited states as a list. The element with
29 * index 0 ist the current State. The size of the history is
30 * defined in the graph. Type: {@link ProcessableState}
31 *
32 */
33 public void execute(ProcessableState currentState, StateContext stateContext, Condition previousCondition,
34 List lastVisitedStatesHistory);
35
36 }
|