Interface MMRFSCoreTrade
- All Known Implementing Classes:
MMRFSTrade
,MMRollOverTrade
A single MMRFSCoreTrade active in the system.
A Trade is initiated by a client and is tied to a TradeChannel
. The lifecycle of a Trade consists
of a number of messages, represented by TradeEvents, being sent between the client and the
Trading System in both directions. These messages cause the Trade to transition between a number
of predefined states.
Trades are comprised of one or more trade legs, which each leg representing the exchange of a financial instrument and the resultant cash flow. It is possible to add, remove and update trades from the client or from the TradingDataSource.
A Trade is uniquely identified in two ways: by RequestId set by the client and a TradeId set by the Trading System.
-
Method Summary
Modifier and TypeMethodDescriptionCreate aTradeEvent
that can be passed to
to trigger the AcceptWarningAck transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the ClientCloseAck transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the Error transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the ExecuteAck transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the Expire transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the Hold transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the PickUp transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the PriceUpdate transition in the trade model of the adapter and client applicationTrade.sendEvent
createPriceUpdateTradeEvent
(Message message) Create aTradeEvent
that can be passed to
to trigger the PriceUpdate transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the Reject transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the SubmitAck transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the TradeConfirmation transition in the trade model of the adapter and client applicationTrade.sendEvent
createTradeConfirmationTradeEvent
(Message message) Create aTradeEvent
that can be passed to
to trigger the TradeConfirmation transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the Warning transition in the trade model of the adapter and client applicationTrade.sendEvent
Create aTradeEvent
that can be passed to
to trigger the Withdraw transition in the trade model of the adapter and client applicationTrade.sendEvent
com.caplin.trading.Trade
Returns the ID generated from the client.Returns the username of the logged in user that created this trade.void
Send aTradeEvent
with no fields to trigger the AcceptWarningAck transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
to trigger the AcceptWarningAck transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
with no fields to trigger the ClientCloseAck transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
to trigger the ClientCloseAck transition in the trade model of the adapter and client applicationvoid
sendErrorEvent
(ErrorTradeEvent event) Send aTradeEvent
to trigger the Error transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
with no fields to trigger the ExecuteAck transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
to trigger the ExecuteAck transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
with no fields to trigger the Expire transition in the trade model of the adapter and client applicationvoid
sendExpireEvent
(ExpireTradeEvent event) Send aTradeEvent
to trigger the Expire transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
with no fields to trigger the Hold transition in the trade model of the adapter and client applicationvoid
sendHoldEvent
(HoldTradeEvent event) Send aTradeEvent
to trigger the Hold transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
with no fields to trigger the PickUp transition in the trade model of the adapter and client applicationvoid
sendPickUpEvent
(PickUpTradeEvent event) Send aTradeEvent
to trigger the PickUp transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
to trigger the PriceUpdate transition in the trade model of the adapter and client applicationvoid
sendRejectEvent
(RejectTradeEvent event) Send aTradeEvent
to trigger the Reject transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
with no fields to trigger the SubmitAck transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
to trigger the SubmitAck transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
to trigger the TradeConfirmation transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
with no fields to trigger the Warning transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
to trigger the Warning transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
with no fields to trigger the Withdraw transition in the trade model of the adapter and client applicationvoid
Send aTradeEvent
to trigger the Withdraw transition in the trade model of the adapter and client application
-
Method Details
-
createErrorTradeEvent
ErrorTradeEvent createErrorTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the Error transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of ErrorTradeEvent.
-
sendErrorEvent
Send a
TradeEvent
to trigger the Error transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
createSubmitAckTradeEvent
SubmitAckTradeEvent createSubmitAckTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the SubmitAck transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of SubmitAckTradeEvent.
-
sendSubmitAckEvent
Send a
TradeEvent
to trigger the SubmitAck transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
sendSubmitAckEvent
void sendSubmitAckEvent()Send a
TradeEvent
with no fields to trigger the SubmitAck transition in the trade model of the adapter and client application -
createTradeConfirmationTradeEvent
TradeConfirmationTradeEvent createTradeConfirmationTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the TradeConfirmation transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of TradeConfirmationTradeEvent.
-
sendTradeConfirmationEvent
Send a
TradeEvent
to trigger the TradeConfirmation transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
createTradeConfirmationTradeEvent
Create a
TradeEvent
that can be passed to
to trigger the TradeConfirmation transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of TradeConfirmationTradeEvent.
-
createRejectTradeEvent
RejectTradeEvent createRejectTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the Reject transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of RejectTradeEvent.
-
sendRejectEvent
Send a
TradeEvent
to trigger the Reject transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
createClientCloseAckTradeEvent
ClientCloseAckTradeEvent createClientCloseAckTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the ClientCloseAck transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of ClientCloseAckTradeEvent.
-
sendClientCloseAckEvent
Send a
TradeEvent
to trigger the ClientCloseAck transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
sendClientCloseAckEvent
void sendClientCloseAckEvent()Send a
TradeEvent
with no fields to trigger the ClientCloseAck transition in the trade model of the adapter and client application -
createWithdrawTradeEvent
WithdrawTradeEvent createWithdrawTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the Withdraw transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of WithdrawTradeEvent.
-
sendWithdrawEvent
Send a
TradeEvent
to trigger the Withdraw transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
sendWithdrawEvent
void sendWithdrawEvent()Send a
TradeEvent
with no fields to trigger the Withdraw transition in the trade model of the adapter and client application -
createExecuteAckTradeEvent
ExecuteAckTradeEvent createExecuteAckTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the ExecuteAck transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of ExecuteAckTradeEvent.
-
sendExecuteAckEvent
Send a
TradeEvent
to trigger the ExecuteAck transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
sendExecuteAckEvent
void sendExecuteAckEvent()Send a
TradeEvent
with no fields to trigger the ExecuteAck transition in the trade model of the adapter and client application -
createPriceUpdateTradeEvent
PriceUpdateTradeEvent createPriceUpdateTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the PriceUpdate transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of PriceUpdateTradeEvent.
-
sendPriceUpdateEvent
Send a
TradeEvent
to trigger the PriceUpdate transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
createPriceUpdateTradeEvent
Create a
TradeEvent
that can be passed to
to trigger the PriceUpdate transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of PriceUpdateTradeEvent.
-
createWarningTradeEvent
WarningTradeEvent createWarningTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the Warning transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of WarningTradeEvent.
-
sendWarningEvent
Send a
TradeEvent
to trigger the Warning transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
sendWarningEvent
void sendWarningEvent()Send a
TradeEvent
with no fields to trigger the Warning transition in the trade model of the adapter and client application -
createHoldTradeEvent
HoldTradeEvent createHoldTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the Hold transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of HoldTradeEvent.
-
sendHoldEvent
Send a
TradeEvent
to trigger the Hold transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
sendHoldEvent
void sendHoldEvent()Send a
TradeEvent
with no fields to trigger the Hold transition in the trade model of the adapter and client application -
createExpireTradeEvent
ExpireTradeEvent createExpireTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the Expire transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of ExpireTradeEvent.
-
sendExpireEvent
Send a
TradeEvent
to trigger the Expire transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
sendExpireEvent
void sendExpireEvent()Send a
TradeEvent
with no fields to trigger the Expire transition in the trade model of the adapter and client application -
createPickUpTradeEvent
PickUpTradeEvent createPickUpTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the PickUp transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of PickUpTradeEvent.
-
sendPickUpEvent
Send a
TradeEvent
to trigger the PickUp transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
sendPickUpEvent
void sendPickUpEvent()Send a
TradeEvent
with no fields to trigger the PickUp transition in the trade model of the adapter and client application -
createAcceptWarningAckTradeEvent
AcceptWarningAckTradeEvent createAcceptWarningAckTradeEvent()Create a
TradeEvent
that can be passed to
to trigger the AcceptWarningAck transition in the trade model of the adapter and client applicationTrade.sendEvent
- Returns:
- A new instance of AcceptWarningAckTradeEvent.
-
sendAcceptWarningAckEvent
Send a
TradeEvent
to trigger the AcceptWarningAck transition in the trade model of the adapter and client application- Parameters:
event
- The event to send.
-
sendAcceptWarningAckEvent
void sendAcceptWarningAckEvent()Send a
TradeEvent
with no fields to trigger the AcceptWarningAck transition in the trade model of the adapter and client application -
getRequestID
String getRequestID()Returns the ID generated from the client. The combination of user and trade is unique.- Returns:
- the request ID.
-
getUsername
String getUsername()Returns the username of the logged in user that created this trade.- Returns:
- the username of the logged in user.
-
getBackingTrade
com.caplin.trading.Trade getBackingTrade()
-