com.bankframe.fe.statemachine.ext.connectors.swing
Class ThreadedStateMachineEventDispatcher

java.lang.Object
  extended bycom.bankframe.fe.statemachine.ext.connectors.swing.ThreadedStateMachineEventDispatcher
All Implemented Interfaces:
java.util.EventListener, StateMachineEventListener

public class ThreadedStateMachineEventDispatcher
extends java.lang.Object
implements StateMachineEventListener


Constructor Summary
ThreadedStateMachineEventDispatcher()
          Creates a new StateMachineEventDispatcher.
ThreadedStateMachineEventDispatcher(ViewContainer viewContainer, java.util.Properties stateMachineParameters)
          Creates new StateMachineEventDispatcher.
 
Method Summary
 void addStateMachineProcessingListener(java.util.Collection listeners)
           
 void addStateMachineProcessingListener(StateMachineProcessingListener listener)
           
static void fireStateMachineEvent(StateMachineEvent evt, javax.swing.event.EventListenerList listenerList)
          This method fires the given StateMachineEvent to all StateMachineEventListeners in the provided EventListenerList.
 IApplicationManager getApplicationManager()
          Getter for property applicationManager.
 java.util.Properties getStateMachineParameters()
          Getter for property stateMachineParameters.
 IUserSessionManager getUserSessionManager()
          Getter for property userSessionManager.
 ViewContainer getViewContainer()
          Getter for property viewContainer.
 void handleStatemachineEvent(StateMachineEvent evt)
          This method dispatches the given Event to the RequestManager.
 void removeStateMachineProcessingListener(java.util.Collection listeners)
           
 void removeStateMachineProcessingListener(StateMachineProcessingListener listener)
           
 void setApplicationManager(IApplicationManager applicationManager)
          Setter for property applicationManager.
 void setStateMachineParameters(java.util.Properties stateMachineParameters)
          Setter for property stateMachineParameters.
 void setUserSessionManager(IUserSessionManager userSessionManager)
          Setter for property userSessionManager.
 void setViewContainer(ViewContainer viewContainer)
          Setter for property viewContainer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadedStateMachineEventDispatcher

public ThreadedStateMachineEventDispatcher(ViewContainer viewContainer,
                                           java.util.Properties stateMachineParameters)
                                    throws StateMachineException
Creates new StateMachineEventDispatcher.
This is the recommended constructor to use. Give it the viewContainer and properties, and it will work out all the details.

Parameters:
viewContainer - The ViewContainer to set automatically on all Events dispatched.
stateMachineParameters - The properties to be supplied to the RequestManager and factories.
Throws:
StateMachineException - If the Factories cannot create an ApplicationManager or UserSessionManager.

ThreadedStateMachineEventDispatcher

public ThreadedStateMachineEventDispatcher()
Creates a new StateMachineEventDispatcher.
In case you want to override the defaults used by the other constructor, this constructor allows you use the setter and getter methods to control all the attributes of the StateMachineEventDispatcher.

Method Detail

handleStatemachineEvent

public void handleStatemachineEvent(StateMachineEvent evt)
This method dispatches the given Event to the RequestManager. It creates a new Runner and places it in the event handling queue by calling SwingUtilities.invokeLater.

Specified by:
handleStatemachineEvent in interface StateMachineEventListener
Parameters:
evt - The StateMachineEvent to be dispatched.

getApplicationManager

public IApplicationManager getApplicationManager()
Getter for property applicationManager.

Returns:
Value of property applicationManager.

setApplicationManager

public void setApplicationManager(IApplicationManager applicationManager)
Setter for property applicationManager.

Parameters:
applicationManager - New value of property applicationManager.

getStateMachineParameters

public java.util.Properties getStateMachineParameters()
Getter for property stateMachineParameters.

Returns:
Value of property stateMachineParameters.

setStateMachineParameters

public void setStateMachineParameters(java.util.Properties stateMachineParameters)
Setter for property stateMachineParameters.

Parameters:
stateMachineParameters - New value of property stateMachineParameters.

getUserSessionManager

public IUserSessionManager getUserSessionManager()
Getter for property userSessionManager.

Returns:
Value of property userSessionManager.

setUserSessionManager

public void setUserSessionManager(IUserSessionManager userSessionManager)
Setter for property userSessionManager.

Parameters:
userSessionManager - New value of property userSessionManager.

getViewContainer

public ViewContainer getViewContainer()
Getter for property viewContainer.

Returns:
Value of property viewContainer.

setViewContainer

public void setViewContainer(ViewContainer viewContainer)
Setter for property viewContainer.

Parameters:
viewContainer - New value of property viewContainer.

fireStateMachineEvent

public static void fireStateMachineEvent(StateMachineEvent evt,
                                         javax.swing.event.EventListenerList listenerList)
This method fires the given StateMachineEvent to all StateMachineEventListeners in the provided EventListenerList. This convenience method can be used from any Swing views you write.

Parameters:
evt - The StateMachineEvent to be fired.
listenerList - The javax.swing.event.EventListenerList containing the StateMachineEventListeners.

addStateMachineProcessingListener

public void addStateMachineProcessingListener(StateMachineProcessingListener listener)

removeStateMachineProcessingListener

public void removeStateMachineProcessingListener(StateMachineProcessingListener listener)

addStateMachineProcessingListener

public void addStateMachineProcessingListener(java.util.Collection listeners)

removeStateMachineProcessingListener

public void removeStateMachineProcessingListener(java.util.Collection listeners)


Copyright © 2004 Siebel Systems, Inc. All rights reserved.