de.fhg.igd.jhsm
Interface State

All Superinterfaces:
Component
All Known Subinterfaces:
CompositeState
All Known Implementing Classes:
HSM, HSMState

public interface State
extends Component

"A state is a condition or situation during the life of an object during which it satisfies some condition, performs some activity, or waits for some event." - Booch et al, The UML User Guide.

Version:
"$Id: State.java 1913 2007-08-08 02:41:53Z jpeters $"
Author:
Jan Haevecker

Method Summary
 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 interface de.fhg.igd.jhsm.Component
action, getAction, getName, getParent, setAction, setName, setParent
 

Method Detail

entry

public void entry(Context context)
Executes the entry action of the state.

Parameters:
context - The context for the given action.

exit

public void exit(Context context)
Executes the exit action of the state.

Parameters:
context - The context for the given action.

addTransition

public void addTransition(Transition transition)
Attaches a transition to this state.

Parameters:
transition - The transition that should be attached.

removeTransition

public void removeTransition(Transition transition)
Removes a transition from this state.

Parameters:
transition - The transition that should be removed.

setExit

public void setExit(Action action)
Sets the action object that is executed on exit of this state.


setEntry

public void setEntry(Action action)
Sets the action object that is executed on entry of this state.


addDeferred

public void addDeferred(Event event)
Adds an event to the list of events that should be deferred.


removeDeferred

public void removeDeferred(Event event)
Removes an event from the list of events that should be deferred.


defers

public boolean defers(Event event)
Checks if a given event is deferred by this state.

Parameters:
event - The event that should be checked.
Returns:
true if the event is deferred by the state, false else.

getDeferred

public List getDeferred()
Returns all Events that are deferred by this state.

Returns:
A set of events objects.

getTransitions

public Set getTransitions()
Returns all transitions that have been attached to this state.

Returns:
A set of transition objects.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.