Class MMRFSTrade
- All Implemented Interfaces:
MMRFSCoreTrade
A single MMRFSTrade 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.
-
Constructor Summary
ConstructorsConstructorDescriptionMMRFSTrade(@NotNull com.caplin.trading.Trade backingTrade, @NotNull ScheduledExecutorService executorService) Constructor used by the generated code. -
Method Summary
Modifier and TypeMethodDescription@NotNull AcceptWarningAckTradeEventCreate aTradeEventthat can be passed toto trigger the AcceptWarningAck transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull ClientCloseAckTradeEventCreate aTradeEventthat can be passed toto trigger the ClientCloseAck transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull ErrorTradeEventCreate aTradeEventthat can be passed toto trigger the Error transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull ExecuteAckTradeEventCreate aTradeEventthat can be passed toto trigger the ExecuteAck transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull ExpireTradeEventCreate aTradeEventthat can be passed toto trigger the Expire transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull HoldTradeEventCreate aTradeEventthat can be passed toto trigger the Hold transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull PickUpTradeEventCreate aTradeEventthat can be passed toto trigger the PickUp transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull PriceUpdateTradeEventCreate aTradeEventthat can be passed toto trigger the PriceUpdate transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull PriceUpdateTradeEventcreatePriceUpdateTradeEvent(@NotNull Message message) Create aTradeEventthat can be passed toto trigger the PriceUpdate transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull RejectTradeEventCreate aTradeEventthat can be passed toto trigger the Reject transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull SubmitAckTradeEventCreate aTradeEventthat can be passed toto trigger the SubmitAck transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull TradeConfirmationTradeEventCreate aTradeEventthat can be passed toto trigger the TradeConfirmation transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull TradeConfirmationTradeEventcreateTradeConfirmationTradeEvent(@NotNull Message message) Create aTradeEventthat can be passed toto trigger the TradeConfirmation transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull WarningTradeEventCreate aTradeEventthat can be passed toto trigger the Warning transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull WithdrawTradeEventCreate aTradeEventthat can be passed toto trigger the Withdraw transition in the trade model of the adapter and client applicationTrade.sendEventvoidSend aTradeEventwith no fields to trigger the AcceptWarningAck transition in the trade model of the adapter and client applicationvoidsendAcceptWarningAckEvent(@NotNull AcceptWarningAckTradeEvent event) Send aTradeEventto trigger the AcceptWarningAck transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the ClientCloseAck transition in the trade model of the adapter and client applicationvoidsendClientCloseAckEvent(@NotNull ClientCloseAckTradeEvent event) Send aTradeEventto trigger the ClientCloseAck transition in the trade model of the adapter and client applicationvoidsendErrorEvent(@NotNull ErrorTradeEvent event) Send aTradeEventto trigger the Error transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the ExecuteAck transition in the trade model of the adapter and client applicationvoidsendExecuteAckEvent(@NotNull ExecuteAckTradeEvent event) Send aTradeEventto trigger the ExecuteAck transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the Expire transition in the trade model of the adapter and client applicationvoidsendExpireEvent(@NotNull ExpireTradeEvent event) Send aTradeEventto trigger the Expire transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the Hold transition in the trade model of the adapter and client applicationvoidsendHoldEvent(@NotNull HoldTradeEvent event) Send aTradeEventto trigger the Hold transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the PickUp transition in the trade model of the adapter and client applicationvoidsendPickUpEvent(@NotNull PickUpTradeEvent event) Send aTradeEventto trigger the PickUp transition in the trade model of the adapter and client applicationvoidsendPriceUpdateEvent(@NotNull PriceUpdateTradeEvent event) Send aTradeEventto trigger the PriceUpdate transition in the trade model of the adapter and client applicationvoidsendPriceUpdateEvent(@NotNull Message message) Send aTradeEventto trigger the PriceUpdate transition in the trade model of the adapter and client applicationvoidsendRejectEvent(@NotNull RejectTradeEvent event) Send aTradeEventto trigger the Reject transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the SubmitAck transition in the trade model of the adapter and client applicationvoidsendSubmitAckEvent(@NotNull SubmitAckTradeEvent event) Send aTradeEventto trigger the SubmitAck transition in the trade model of the adapter and client applicationvoidsendTradeConfirmationEvent(@NotNull TradeConfirmationTradeEvent event) Send aTradeEventto trigger the TradeConfirmation transition in the trade model of the adapter and client applicationvoidsendTradeConfirmationEvent(@NotNull Message message) Send aTradeEventto trigger the TradeConfirmation transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the Warning transition in the trade model of the adapter and client applicationvoidsendWarningEvent(@NotNull WarningTradeEvent event) Send aTradeEventto trigger the Warning transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the Withdraw transition in the trade model of the adapter and client applicationvoidsendWithdrawEvent(@NotNull WithdrawTradeEvent event) Send aTradeEventto trigger the Withdraw transition in the trade model of the adapter and client applicationMethods inherited from class com.caplin.motif.UserTrade
getBackingTrade, getExecutorService, getRequestID, getUsername, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.caplin.generated.motif.mm.trading.mmrfscore.MMRFSCoreTrade
getBackingTrade, getRequestID, getUsername
-
Constructor Details
-
MMRFSTrade
public MMRFSTrade(@NotNull @NotNull com.caplin.trading.Trade backingTrade, @NotNull @NotNull ScheduledExecutorService executorService) Constructor used by the generated code.
- Parameters:
backingTrade- To be used for the parent constructorexecutorService- To be used for the parent constructor (What service is going execute the backingTrade)
-
-
Method Details
-
createErrorTradeEvent
Create a
TradeEventthat can be passed toto trigger the Error transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createErrorTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of ErrorTradeEvent.
-
sendErrorEvent
Send a
TradeEventto trigger the Error transition in the trade model of the adapter and client application- Specified by:
sendErrorEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
createSubmitAckTradeEvent
Create a
TradeEventthat can be passed toto trigger the SubmitAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createSubmitAckTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of SubmitAckTradeEvent.
-
sendSubmitAckEvent
Send a
TradeEventto trigger the SubmitAck transition in the trade model of the adapter and client application- Specified by:
sendSubmitAckEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendSubmitAckEvent
public void sendSubmitAckEvent()Send a
TradeEventwith no fields to trigger the SubmitAck transition in the trade model of the adapter and client application- Specified by:
sendSubmitAckEventin interfaceMMRFSCoreTrade
-
createTradeConfirmationTradeEvent
Create a
TradeEventthat can be passed toto trigger the TradeConfirmation transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createTradeConfirmationTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of TradeConfirmationTradeEvent.
-
sendTradeConfirmationEvent
Send a
TradeEventto trigger the TradeConfirmation transition in the trade model of the adapter and client application- Specified by:
sendTradeConfirmationEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendTradeConfirmationEvent
Send a
TradeEventto trigger the TradeConfirmation transition in the trade model of the adapter and client application- Parameters:
message- The message to send.
-
createTradeConfirmationTradeEvent
@NotNull public @NotNull TradeConfirmationTradeEvent createTradeConfirmationTradeEvent(@NotNull @NotNull Message message) Create a
TradeEventthat can be passed toto trigger the TradeConfirmation transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createTradeConfirmationTradeEventin interfaceMMRFSCoreTrade- Parameters:
message- a Message to be passed to the TradeEvent- Returns:
- A new instance of TradeConfirmationTradeEvent.
-
createRejectTradeEvent
Create a
TradeEventthat can be passed toto trigger the Reject transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createRejectTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of RejectTradeEvent.
-
sendRejectEvent
Send a
TradeEventto trigger the Reject transition in the trade model of the adapter and client application- Specified by:
sendRejectEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
createClientCloseAckTradeEvent
Create a
TradeEventthat can be passed toto trigger the ClientCloseAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createClientCloseAckTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of ClientCloseAckTradeEvent.
-
sendClientCloseAckEvent
Send a
TradeEventto trigger the ClientCloseAck transition in the trade model of the adapter and client application- Specified by:
sendClientCloseAckEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendClientCloseAckEvent
public void sendClientCloseAckEvent()Send a
TradeEventwith no fields to trigger the ClientCloseAck transition in the trade model of the adapter and client application- Specified by:
sendClientCloseAckEventin interfaceMMRFSCoreTrade
-
createWithdrawTradeEvent
Create a
TradeEventthat can be passed toto trigger the Withdraw transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createWithdrawTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of WithdrawTradeEvent.
-
sendWithdrawEvent
Send a
TradeEventto trigger the Withdraw transition in the trade model of the adapter and client application- Specified by:
sendWithdrawEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendWithdrawEvent
public void sendWithdrawEvent()Send a
TradeEventwith no fields to trigger the Withdraw transition in the trade model of the adapter and client application- Specified by:
sendWithdrawEventin interfaceMMRFSCoreTrade
-
createExecuteAckTradeEvent
Create a
TradeEventthat can be passed toto trigger the ExecuteAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createExecuteAckTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of ExecuteAckTradeEvent.
-
sendExecuteAckEvent
Send a
TradeEventto trigger the ExecuteAck transition in the trade model of the adapter and client application- Specified by:
sendExecuteAckEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendExecuteAckEvent
public void sendExecuteAckEvent()Send a
TradeEventwith no fields to trigger the ExecuteAck transition in the trade model of the adapter and client application- Specified by:
sendExecuteAckEventin interfaceMMRFSCoreTrade
-
createPriceUpdateTradeEvent
Create a
TradeEventthat can be passed toto trigger the PriceUpdate transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createPriceUpdateTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of PriceUpdateTradeEvent.
-
sendPriceUpdateEvent
Send a
TradeEventto trigger the PriceUpdate transition in the trade model of the adapter and client application- Specified by:
sendPriceUpdateEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendPriceUpdateEvent
Send a
TradeEventto trigger the PriceUpdate transition in the trade model of the adapter and client application- Parameters:
message- The message to send.
-
createPriceUpdateTradeEvent
@NotNull public @NotNull PriceUpdateTradeEvent createPriceUpdateTradeEvent(@NotNull @NotNull Message message) Create a
TradeEventthat can be passed toto trigger the PriceUpdate transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createPriceUpdateTradeEventin interfaceMMRFSCoreTrade- Parameters:
message- a Message to be passed to the TradeEvent- Returns:
- A new instance of PriceUpdateTradeEvent.
-
createWarningTradeEvent
Create a
TradeEventthat can be passed toto trigger the Warning transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createWarningTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of WarningTradeEvent.
-
sendWarningEvent
Send a
TradeEventto trigger the Warning transition in the trade model of the adapter and client application- Specified by:
sendWarningEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendWarningEvent
public void sendWarningEvent()Send a
TradeEventwith no fields to trigger the Warning transition in the trade model of the adapter and client application- Specified by:
sendWarningEventin interfaceMMRFSCoreTrade
-
createHoldTradeEvent
Create a
TradeEventthat can be passed toto trigger the Hold transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createHoldTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of HoldTradeEvent.
-
sendHoldEvent
Send a
TradeEventto trigger the Hold transition in the trade model of the adapter and client application- Specified by:
sendHoldEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendHoldEvent
public void sendHoldEvent()Send a
TradeEventwith no fields to trigger the Hold transition in the trade model of the adapter and client application- Specified by:
sendHoldEventin interfaceMMRFSCoreTrade
-
createExpireTradeEvent
Create a
TradeEventthat can be passed toto trigger the Expire transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createExpireTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of ExpireTradeEvent.
-
sendExpireEvent
Send a
TradeEventto trigger the Expire transition in the trade model of the adapter and client application- Specified by:
sendExpireEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendExpireEvent
public void sendExpireEvent()Send a
TradeEventwith no fields to trigger the Expire transition in the trade model of the adapter and client application- Specified by:
sendExpireEventin interfaceMMRFSCoreTrade
-
createPickUpTradeEvent
Create a
TradeEventthat can be passed toto trigger the PickUp transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createPickUpTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of PickUpTradeEvent.
-
sendPickUpEvent
Send a
TradeEventto trigger the PickUp transition in the trade model of the adapter and client application- Specified by:
sendPickUpEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendPickUpEvent
public void sendPickUpEvent()Send a
TradeEventwith no fields to trigger the PickUp transition in the trade model of the adapter and client application- Specified by:
sendPickUpEventin interfaceMMRFSCoreTrade
-
createAcceptWarningAckTradeEvent
Create a
TradeEventthat can be passed toto trigger the AcceptWarningAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Specified by:
createAcceptWarningAckTradeEventin interfaceMMRFSCoreTrade- Returns:
- A new instance of AcceptWarningAckTradeEvent.
-
sendAcceptWarningAckEvent
Send a
TradeEventto trigger the AcceptWarningAck transition in the trade model of the adapter and client application- Specified by:
sendAcceptWarningAckEventin interfaceMMRFSCoreTrade- Parameters:
event- The event to send.
-
sendAcceptWarningAckEvent
public void sendAcceptWarningAckEvent()Send a
TradeEventwith no fields to trigger the AcceptWarningAck transition in the trade model of the adapter and client application- Specified by:
sendAcceptWarningAckEventin interfaceMMRFSCoreTrade
-