org.jscience.engineering.eventdriven
Class BasicStateChangeHandler

java.lang.Object
  extended by org.jscience.engineering.eventdriven.BasicStateChangeHandler
All Implemented Interfaces:
IStateChangeHandler

public class BasicStateChangeHandler
extends java.lang.Object
implements IStateChangeHandler

Provides a basic reporting mechanism for logging state changes during run-time. This allows for some basic debugging of state models and would not normally be used in production code, so by default no handler is associated with an Engine and there will be no output.

This handler reports state change information on the standard output stream.


Constructor Summary
BasicStateChangeHandler()
          

Constructor.

 
Method Summary
 void handleStateChange(StateChangeRecord scr)
          

Called by the engine whenever an entity changes state.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicStateChangeHandler

public BasicStateChangeHandler()

Constructor.

Method Detail

handleStateChange

public void handleStateChange(StateChangeRecord scr)
Description copied from interface: IStateChangeHandler

Called by the engine whenever an entity changes state. Concrete implementations can report the details using any suitable mechanism.

Specified by:
handleStateChange in interface IStateChangeHandler
Parameters:
scr - The record containing details about the state change.