Class
caplin.trading.workbench.model

StateMachineMonitor

A Stub class for testing the trade model.

Constructor Summary

Attributes Name and Description
caplin.trading.workbench.model.StateMachineMonitor(Object oStateModel)

Method Summary

Attributes Name and Description
Array getAllStates()

Returns all the states from the state model.

caplin.trading.statemachine.State getCurrentState()

Returns the current state.

caplin.trading.statemachine.StateModel getStateModel()

Returns the state model.

void setStateChangedListener( fListener, bFireImediately)

Allows the user to register a listener that will be fired any time there is a state change.

void setStateMachine(Object oStateMachine)

Sets the state machine we will be monitoring.

void setStateOrder(Array pStateOrder)

Sets the order of the states in the state monitor.

void stateChanged( oState, eventName)

Constructor Detail

caplin.trading.workbench.model.StateMachineMonitor(Object oStateModel)

Parameters
Object oStateModel the state model.

Method Detail

Array getAllStates()

Returns all the states from the state model.

Returns
{Array}

caplin.trading.statemachine.State getCurrentState()

Returns the current state.

Returns
{caplin.trading.statemachine.State}

caplin.trading.statemachine.StateModel getStateModel()

Returns the state model.

Returns
{caplin.trading.statemachine.StateModel}

void setStateChangedListener( fListener, bFireImediately)

Allows the user to register a listener that will be fired any time there is a state change.

Parameters
fListener
bFireImediately

void setStateMachine(Object oStateMachine)

Sets the state machine we will be monitoring.

Parameters
Object oStateMachine

void setStateOrder(Array pStateOrder)

Sets the order of the states in the state monitor. Use this method only if you are using the caplin.trading.workbench.ui.StateModelVisualiser, it is not needed any more for the caplin.trading.workbench.TradeStateVisualiser.

Parameters
Array pStateOrder an ordered array of the list of the states for the state monitor.

void stateChanged( oState, eventName)

Parameters
oState
eventName
See
caplin.trading.statemachine.StateChangedListener#stateChanged