com.ptc.windchill.upgrade.util.fsm
Class StateMachineEventMulticaster

java.lang.Object
  extended byjava.awt.AWTEventMulticaster
      extended bycom.ptc.windchill.upgrade.util.fsm.StateMachineEventMulticaster
All Implemented Interfaces:
ActionListener, AdjustmentListener, ComponentListener, ContainerListener, EventListener, FocusListener, HierarchyBoundsListener, HierarchyListener, InputMethodListener, ItemListener, KeyListener, MouseListener, MouseMotionListener, MouseWheelListener, StateMachineListener, TextListener, WindowFocusListener, WindowListener, WindowStateListener

class StateMachineEventMulticaster
extends AWTEventMulticaster
implements StateMachineListener


Field Summary
 
Fields inherited from class java.awt.AWTEventMulticaster
a, b
 
Constructor Summary
protected StateMachineEventMulticaster(StateMachineListener a, StateMachineListener b)
          Constructor to support multicast events.
 
Method Summary
static StateMachineListener add(StateMachineListener a, StateMachineListener b)
          Add new listener to support multicast events.
protected static EventListener addInternal(EventListener a, EventListener b)
          Add new listener to support multicast events.
 void eventEnabledStateEvaluationError(Throwable throwable)
          Invoked whenever an unexpected error occurs trying to determine the enabled state of any of the events types in the state machine.
 void eventHandlingError(Event event, Throwable throwable)
          Invoked whenever an unexpected error occurs running an action in response to an event.
 void eventTypeEnabledStateChanged(EventType event_type, boolean is_enabled)
          Invoked whenever the StateMachine figures out that events of a particular EventType become enabled or disabled.
 void postStateActivate(State state)
          Invoked just after activating a state.
 void postStateDeactivate(State state)
          Invoked just after de-activating a state.
 void preStateActivate(State state)
          Invoked just prior to activating a state.
 void preStateDeactivate(State state)
          Invoked just prior to de-activating a state.
protected  EventListener remove(StateMachineListener oldl)
           
static StateMachineListener remove(StateMachineListener l, StateMachineListener oldl)
          Remove listener to support multicast events.
 void stateMachineStopped()
          Invoked when the StateMachine transitions to a stop state.
 
Methods inherited from class java.awt.AWTEventMulticaster
actionPerformed, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, adjustmentValueChanged, ancestorMoved, ancestorResized, caretPositionChanged, componentAdded, componentHidden, componentMoved, componentRemoved, componentResized, componentShown, focusGained, focusLost, getListeners, hierarchyChanged, inputMethodTextChanged, itemStateChanged, keyPressed, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, remove, removeInternal, save, saveInternal, textValueChanged, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateMachineEventMulticaster

protected StateMachineEventMulticaster(StateMachineListener a,
                                       StateMachineListener b)
Constructor to support multicast events.

Parameters:
a - EventListener
b - EventListener
Method Detail

add

public static StateMachineListener add(StateMachineListener a,
                                       StateMachineListener b)
Add new listener to support multicast events.


addInternal

protected static EventListener addInternal(EventListener a,
                                           EventListener b)
Add new listener to support multicast events.

Parameters:
a - EventListener
b - EventListener
Returns:
EventListener

remove

protected EventListener remove(StateMachineListener oldl)
Returns:
EventListener

remove

public static StateMachineListener remove(StateMachineListener l,
                                          StateMachineListener oldl)
Remove listener to support multicast events.


preStateActivate

public void preStateActivate(State state)
Description copied from interface: StateMachineListener
Invoked just prior to activating a state.

Specified by:
preStateActivate in interface StateMachineListener

postStateActivate

public void postStateActivate(State state)
Description copied from interface: StateMachineListener
Invoked just after activating a state.

Specified by:
postStateActivate in interface StateMachineListener

preStateDeactivate

public void preStateDeactivate(State state)
Description copied from interface: StateMachineListener
Invoked just prior to de-activating a state.

Specified by:
preStateDeactivate in interface StateMachineListener

postStateDeactivate

public void postStateDeactivate(State state)
Description copied from interface: StateMachineListener
Invoked just after de-activating a state.

Specified by:
postStateDeactivate in interface StateMachineListener

eventHandlingError

public void eventHandlingError(Event event,
                               Throwable throwable)
Description copied from interface: StateMachineListener
Invoked whenever an unexpected error occurs running an action in response to an event. This could include an unexpected error in another StateMachineListener or such things as multiple ambiguous actions being applicable for a certain event.

Specified by:
eventHandlingError in interface StateMachineListener

eventEnabledStateEvaluationError

public void eventEnabledStateEvaluationError(Throwable throwable)
Description copied from interface: StateMachineListener
Invoked whenever an unexpected error occurs trying to determine the enabled state of any of the events types in the state machine. The likely cause of this is a failed Condition evaluation.

Specified by:
eventEnabledStateEvaluationError in interface StateMachineListener

eventTypeEnabledStateChanged

public void eventTypeEnabledStateChanged(EventType event_type,
                                         boolean is_enabled)
Description copied from interface: StateMachineListener
Invoked whenever the StateMachine figures out that events of a particular EventType become enabled or disabled.

Specified by:
eventTypeEnabledStateChanged in interface StateMachineListener

stateMachineStopped

public void stateMachineStopped()
Description copied from interface: StateMachineListener
Invoked when the StateMachine transitions to a stop state.

Specified by:
stateMachineStopped in interface StateMachineListener