ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.conversation
Interface StateMachineInterface

All Known Implementing Classes:
StateMachine

public interface StateMachineInterface

Description of a state machine, suitable for CPGraphLoader/Viewer. that can visualize the state machine irrespective of the way the state machine has been implemented

OLD VERSION -- TO BE DELETED Replaced by com.ibm.conversation.CpStateMachine.


Field Summary
static java.lang.String CURRENT_STATE_PROPERTY
          A property type on which a CPGraphViewer registers a property change listener so that changes in the current state are propagated to the visualizer.
 
Method Summary
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener newListener)
          Add a property change listener for the given property name to the state-machine
 java.util.Enumeration getAllStateIds()
          Returns an enumeration of String ids of all states in the state machine
 java.util.Enumeration getAllTransitionNames(java.lang.String stateId)
          Returns an enumeration of all transition names from the state identified by the state id.
 java.lang.String getCurrentStateId()
          Return the current state id of the state-machine (conversation) during execution
 java.lang.String getEvent(java.lang.String stateId, java.lang.String transitionName)
          Returns the event name associated with the transition from a particular state
 java.lang.String getInitialStateId()
          Return the initial state id of the state-machine (conversation)
 java.util.Vector getRoles()
          Return the set of roles in the conversation represented by the state machine
 java.lang.String getTargetStateId(java.lang.String sourceStateId, java.lang.String transitionName)
          Returns the identifier of the state reached from a state by making a particular transition.
 boolean isLoadChildState(java.lang.String stateId)
          Checks if a particular state is a state where a new child CP is loaded
 boolean isTerminalState(java.lang.String stateId)
          Checks if a particular state is a terminal state
 

Field Detail

CURRENT_STATE_PROPERTY

public static final java.lang.String CURRENT_STATE_PROPERTY
A property type on which a CPGraphViewer registers a property change listener so that changes in the current state are propagated to the visualizer.

Any implementation of the interface should add property change listeners for this property which is meant to propagate changes in the current state to the visualizer (CPGraphViewer)

Method Detail

getRoles

public java.util.Vector getRoles()
Return the set of roles in the conversation represented by the state machine

Returns:
A two-element vector containing the string names of the roles in the conversation

getInitialStateId

public java.lang.String getInitialStateId()
Return the initial state id of the state-machine (conversation)

Returns:
Return the id of the initial state

getCurrentStateId

public java.lang.String getCurrentStateId()
Return the current state id of the state-machine (conversation) during execution

Returns:
Return the id of the current state

getAllStateIds

public java.util.Enumeration getAllStateIds()
Returns an enumeration of String ids of all states in the state machine

Returns:
Enumeration containing string ids of all states in the state machine

getAllTransitionNames

public java.util.Enumeration getAllTransitionNames(java.lang.String stateId)
Returns an enumeration of all transition names from the state identified by the state id.

Parameters:
stateId - string identifier for the state

Returns:
enumeration of all transition names from the state identified by stateId

getTargetStateId

public java.lang.String getTargetStateId(java.lang.String sourceStateId,
                                         java.lang.String transitionName)
Returns the identifier of the state reached from a state by making a particular transition.

Parameters:
sourceStateId - identifier of the source state

name - of the transition

Returns:
identifier of the state reached from a state by making a particular transition.

isTerminalState

public boolean isTerminalState(java.lang.String stateId)
Checks if a particular state is a terminal state

Parameters:
stateId - identifier for a state

transitionName - name of a transition

Returns:
true if the state is a terminal state, false otherwise

isLoadChildState

public boolean isLoadChildState(java.lang.String stateId)
Checks if a particular state is a state where a new child CP is loaded

Parameters:
stateId - identifier for a state

Returns:
true if the state is a child CP is loaded at the state, false otherwise

getEvent

public java.lang.String getEvent(java.lang.String stateId,
                                 java.lang.String transitionName)
Returns the event name associated with the transition from a particular state

Parameters:
stateId - string identifier for a state

transitionName - name of a transition

Returns:
the event name associated with the transition

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener newListener)
Add a property change listener for the given property name to the state-machine

Parameters:
property - name of the property

newListener - the property change listener to be added

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003