|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fhg.igd.jhsm.AbstractComponent
de.fhg.igd.jhsm.HSMState
A generic state.
| Field Summary | |
private List |
deferredEvents_
|
private Action |
entry_
|
private Action |
exit_
|
private Logger |
LOG
|
private Set |
transitions_
|
| Fields inherited from class de.fhg.igd.jhsm.AbstractComponent |
|
| Constructor Summary | |
HSMState()
Default constructor. |
|
HSMState(String name)
Convenience constructor. |
|
| Method Summary | |
void |
action(Context context)
Performs the component's action in a specified context. |
void |
addDeferred(Event event)
Adds an event to the list of events that should be deferred. |
void |
addTransition(Transition transition)
Attaches a transition to this state. |
boolean |
defers(Event event)
Checks if a given event is deferred by this state. |
void |
entry(Context context)
Executes the entry action of the state. |
void |
exit(Context context)
Executes the exit action of the state. |
List |
getDeferred()
Returns all Events that are deferred by this state. |
Set |
getTransitions()
Returns all transitions that have been attached to this state. |
void |
removeDeferred(Event event)
Removes an event from the list of events that should be deferred. |
void |
removeTransition(Transition transition)
Removes a transition from this state. |
void |
setEntry(Action action)
Sets the action object that is executed on entry of this state. |
void |
setExit(Action action)
Sets the action object that is executed on exit of this state. |
| Methods inherited from class de.fhg.igd.jhsm.AbstractComponent |
getAction, getName, getParent, setAction, setName, setParent, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface de.fhg.igd.jhsm.Component |
getAction, getName, getParent, setAction, setName, setParent |
| Field Detail |
private final Logger LOG
private Set transitions_
private List deferredEvents_
private Action entry_
private Action exit_
| Constructor Detail |
public HSMState()
public HSMState(String name)
name - The name that can be used for text outputs.
Note that the name is for debugging purposes only.| Method Detail |
public void action(Context context)
Componentcontext.
This is the hook for the interpreter.
action in interface Componentcontext - Used to publish and retrieve data for/from other actions.public void addDeferred(Event event)
State
addDeferred in interface Statepublic void addTransition(Transition transition)
State
addTransition in interface Statetransition - The transition that should be attached.public void entry(Context context)
State
entry in interface Statecontext - The context for the given action.public void exit(Context context)
State
exit in interface Statecontext - The context for the given action.public void removeDeferred(Event event)
State
removeDeferred in interface Statepublic Set getTransitions()
State
getTransitions in interface Statepublic void removeTransition(Transition transition)
State
removeTransition in interface Statetransition - The transition that should be removed.public void setExit(Action action)
State
setExit in interface Statepublic void setEntry(Action action)
State
setEntry in interface Statepublic boolean defers(Event event)
State
defers in interface Stateevent - The event that should be checked.
true if the event is deferred by the state,
false else.public List getDeferred()
State
getDeferred in interface State
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||