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
Modifier and TypeMethodDescriptionGets the error message relating to the invalid state transition attempt.Gets the state that the trade was in when the invalid event was received.getTrade()
Gets theTrade
object to which this InvalidTransitionEvent relates.Gets theTradeEvent
that was invalid.
-
Method Details
-
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
String getStateName()Gets the state that the trade was in when the invalid event was received.- Returns:
- The name of the
Trade
state.
-
getMessage
String getMessage()Gets the error message relating to the invalid state transition attempt.- Returns:
- The error message.
-