sm
Class SMWatcher

java.lang.Object
  extended bysm.SMWatcher

public class SMWatcher
extends java.lang.Object

A 'watcher' to track a state machine. It registers listeners for SMEvents (when the state machine is attached to an interactive object, detached from an interactive object, is suspended, is resumed, is restarted, changes state or passes a transition looping in the current state).

Author:
Caroline Appert

Constructor Summary
SMWatcher(StateMachine stateMachine)
          Builds a 'watcher' for a state machine.
 
Method Summary
 void addSMEventListener(SMStateMachineEventListener l)
          Registers a listener for SMEvents.
 void removeSMEventListener(SMStateMachineEventListener l)
          Removes a listener for SMEvents.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMWatcher

public SMWatcher(StateMachine stateMachine)
Builds a 'watcher' for a state machine.

Parameters:
stateMachine - The state machine to watch.
Method Detail

addSMEventListener

public void addSMEventListener(SMStateMachineEventListener l)
Registers a listener for SMEvents.

Parameters:
l - The listener to register.

removeSMEventListener

public void removeSMEventListener(SMStateMachineEventListener l)
Removes a listener for SMEvents.

Parameters:
l - The listener to remove.