de.fhg.igd.jhsm
Interface Interpreter

All Superinterfaces:
EventListener, Runnable
All Known Implementing Classes:
HSMInterpreter

public interface Interpreter
extends EventListener, Runnable

An Interpreter for hsm data structures.

It is able to handle to flow of control of a given hierarchical state machine.

The interpreter itself has a number of internal states of operation:

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

Method Summary
 Context getContext()
          Returns the context that is associated with the interpreted state machine.
 CompositeState getRoot()
          Returns the root state of the state machine that is being processed.
 void run()
          Runs the interpretation of the state machine.
 void setContext(Context context)
          Initializes the context that will be associated with all actions of the interpreted state machine.
 void shutdown()
          Signals the interpreter that it should stop the interpretation as soon as possible.
 void suspend()
          Signals the interpreter that it should suspend the interpretation as soon as possible.
 
Methods inherited from interface de.fhg.igd.jhsm.EventListener
eventReceived
 

Method Detail

suspend

public void suspend()
Signals the interpreter that it should suspend the interpretation as soon as possible.


shutdown

public void shutdown()
Signals the interpreter that it should stop the interpretation as soon as possible.


run

public void run()
Runs the interpretation of the state machine. This is also called to start the interpretation.

Specified by:
run in interface Runnable

setContext

public void setContext(Context context)
Initializes the context that will be associated with all actions of the interpreted state machine.

The context does not necessarily have to be set. There are cases in which a global context is not needed. However, if the context is set, it must remain fixed!

Parameters:
context - The context that will be associated with all actions.

getContext

public Context getContext()
Returns the context that is associated with the interpreted state machine.

Returns:
The context that is associated with all actions.

getRoot

public CompositeState getRoot()
Returns the root state of the state machine that is being processed.

Returns:
The root state of the state machine. This can be regarded as a simple container for the state machine. It is not a state in it's original definition.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.