Package com.caplin.trading
Interface InvalidTransitionEvent
-
public interface InvalidTransitionEvent
An event raised when a client event would trigger an invalid state transition on the trade model. This can happen if the triggering event is not valid for current state of the trade model, or the trade model state requires that the event originates from the server, not the client.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getMessage()
Gets the error message relating to the invalid state transition attempt.java.lang.String
getStateName()
Gets the state that the trade was in when the invalid event was received.Trade
getTrade()
Gets theTrade
object to which this InvalidTransitionEvent relates.TradeEvent
getTradeEvent()
Gets theTradeEvent
that was invalid.
-
-
-
Method Detail
-
getTrade
Trade getTrade()
Gets theTrade
object to which this InvalidTransitionEvent relates. As long as your code executes on the thread in whichTradeListener.receiveInvalidTransitionEvent(InvalidTransitionEvent)
was called, the Trade's fields will not be updated by subsequent events, though its state may change.- Returns:
- The
Trade
object.
-
getTradeEvent
TradeEvent getTradeEvent()
Gets theTradeEvent
that was invalid.- Returns:
- The
TradeEvent
.
-
getStateName
java.lang.String getStateName()
Gets the state that the trade was in when the invalid event was received.- Returns:
- The name of the
Trade
state.
-
getMessage
java.lang.String getMessage()
Gets the error message relating to the invalid state transition attempt.- Returns:
- The error message.
-
-