Class SalesInterventionTrade
A single SalesInterventionTrade 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
ConstructorsConstructorDescriptionSalesInterventionTrade(@NotNull com.caplin.trading.Trade backingTrade, @NotNull ScheduledExecutorService executorService) Constructor used by the generated code. -
Method Summary
Modifier and TypeMethodDescription@NotNull AcceptAckTradeEventCreate aTradeEventthat can be passed toto trigger the AcceptAck transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull ClientRejectTradeEventCreate aTradeEventthat can be passed toto trigger the ClientReject 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 HoldAckTradeEventCreate aTradeEventthat can be passed toto trigger the HoldAck transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull PickUpAckTradeEventCreate aTradeEventthat can be passed toto trigger the PickUpAck transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull PickUpAckTradeEventcreatePickUpAckTradeEvent(@NotNull Message message) Create aTradeEventthat can be passed toto trigger the PickUpAck transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull PickUpRejectedTradeEventCreate aTradeEventthat can be passed toto trigger the PickUpRejected transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull PriceUnavailableTradeEventCreate aTradeEventthat can be passed toto trigger the PriceUnavailable transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull PriceUnavailableTradeEventcreatePriceUnavailableTradeEvent(@NotNull Message message) Create aTradeEventthat can be passed toto trigger the PriceUnavailable 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 QuoteAckTradeEventCreate aTradeEventthat can be passed toto trigger the QuoteAck transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull RejectAckTradeEventCreate aTradeEventthat can be passed toto trigger the RejectAck transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull TradeConfirmedTradeEventCreate aTradeEventthat can be passed toto trigger the TradeConfirmed transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull TradeConfirmedTradeEventcreateTradeConfirmedTradeEvent(@NotNull Message message) Create aTradeEventthat can be passed toto trigger the TradeConfirmed transition in the trade model of the adapter and client applicationTrade.sendEvent@NotNull WithdrawAckTradeEventCreate aTradeEventthat can be passed toto trigger the WithdrawAck transition in the trade model of the adapter and client applicationTrade.sendEventvoidSend aTradeEventwith no fields to trigger the AcceptAck transition in the trade model of the adapter and client applicationvoidsendAcceptAckEvent(@NotNull AcceptAckTradeEvent event) Send aTradeEventto trigger the AcceptAck transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the ClientReject transition in the trade model of the adapter and client applicationvoidsendClientRejectEvent(@NotNull ClientRejectTradeEvent event) Send aTradeEventto trigger the ClientReject 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 HoldAck transition in the trade model of the adapter and client applicationvoidsendHoldAckEvent(@NotNull HoldAckTradeEvent event) Send aTradeEventto trigger the HoldAck transition in the trade model of the adapter and client applicationvoidsendPickUpAckEvent(@NotNull PickUpAckTradeEvent event) Send aTradeEventto trigger the PickUpAck transition in the trade model of the adapter and client applicationvoidsendPickUpAckEvent(@NotNull Message message) Send aTradeEventto trigger the PickUpAck transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the PickUpRejected transition in the trade model of the adapter and client applicationvoidsendPickUpRejectedEvent(@NotNull PickUpRejectedTradeEvent event) Send aTradeEventto trigger the PickUpRejected transition in the trade model of the adapter and client applicationvoidsendPriceUnavailableEvent(@NotNull PriceUnavailableTradeEvent event) Send aTradeEventto trigger the PriceUnavailable transition in the trade model of the adapter and client applicationvoidsendPriceUnavailableEvent(@NotNull Message message) Send aTradeEventto trigger the PriceUnavailable 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 applicationvoidSend aTradeEventwith no fields to trigger the QuoteAck transition in the trade model of the adapter and client applicationvoidsendQuoteAckEvent(@NotNull QuoteAckTradeEvent event) Send aTradeEventto trigger the QuoteAck transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the RejectAck transition in the trade model of the adapter and client applicationvoidsendRejectAckEvent(@NotNull RejectAckTradeEvent event) Send aTradeEventto trigger the RejectAck transition in the trade model of the adapter and client applicationvoidsendTradeConfirmedEvent(@NotNull TradeConfirmedTradeEvent event) Send aTradeEventto trigger the TradeConfirmed transition in the trade model of the adapter and client applicationvoidsendTradeConfirmedEvent(@NotNull Message message) Send aTradeEventto trigger the TradeConfirmed transition in the trade model of the adapter and client applicationvoidSend aTradeEventwith no fields to trigger the WithdrawAck transition in the trade model of the adapter and client applicationvoidsendWithdrawAckEvent(@NotNull WithdrawAckTradeEvent event) Send aTradeEventto trigger the WithdrawAck transition in the trade model of the adapter and client applicationMethods inherited from class com.caplin.motif.UserTrade
getBackingTrade, getExecutorService, getRequestID, getUsername, toString
-
Constructor Details
-
SalesInterventionTrade
public SalesInterventionTrade(@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
-
createPickUpAckTradeEvent
Create a
TradeEventthat can be passed toto trigger the PickUpAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of PickUpAckTradeEvent.
-
sendPickUpAckEvent
Send a
TradeEventto trigger the PickUpAck transition in the trade model of the adapter and client application- Parameters:
event- The event to send.
-
sendPickUpAckEvent
Send a
TradeEventto trigger the PickUpAck transition in the trade model of the adapter and client application- Parameters:
message- The message to send.
-
createPickUpAckTradeEvent
@NotNull public @NotNull PickUpAckTradeEvent createPickUpAckTradeEvent(@NotNull @NotNull Message message) Create a
TradeEventthat can be passed toto trigger the PickUpAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Parameters:
message- a Message to be passed to the TradeEvent- Returns:
- A new instance of PickUpAckTradeEvent.
-
createErrorTradeEvent
Create a
TradeEventthat can be passed toto trigger the Error transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of ErrorTradeEvent.
-
sendErrorEvent
Send a
TradeEventto trigger the Error transition in the trade model of the adapter and client application- Parameters:
event- The event to send.
-
createPickUpRejectedTradeEvent
Create a
TradeEventthat can be passed toto trigger the PickUpRejected transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of PickUpRejectedTradeEvent.
-
sendPickUpRejectedEvent
Send a
TradeEventto trigger the PickUpRejected transition in the trade model of the adapter and client application- Parameters:
event- The event to send.
-
sendPickUpRejectedEvent
public void sendPickUpRejectedEvent()Send a
TradeEventwith no fields to trigger the PickUpRejected transition in the trade model of the adapter and client application -
createRejectAckTradeEvent
Create a
TradeEventthat can be passed toto trigger the RejectAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of RejectAckTradeEvent.
-
sendRejectAckEvent
Send a
TradeEventto trigger the RejectAck transition in the trade model of the adapter and client application- Parameters:
event- The event to send.
-
sendRejectAckEvent
public void sendRejectAckEvent()Send a
TradeEventwith no fields to trigger the RejectAck transition in the trade model of the adapter and client application -
createHoldAckTradeEvent
Create a
TradeEventthat can be passed toto trigger the HoldAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of HoldAckTradeEvent.
-
sendHoldAckEvent
Send a
TradeEventto trigger the HoldAck transition in the trade model of the adapter and client application- Parameters:
event- The event to send.
-
sendHoldAckEvent
public void sendHoldAckEvent()Send a
TradeEventwith no fields to trigger the HoldAck transition in the trade model of the adapter and client application -
createPriceUpdateTradeEvent
Create a
TradeEventthat can be passed toto trigger the PriceUpdate transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of PriceUpdateTradeEvent.
-
sendPriceUpdateEvent
Send a
TradeEventto trigger the PriceUpdate transition in the trade model of the adapter and client application- 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- Parameters:
message- a Message to be passed to the TradeEvent- Returns:
- A new instance of PriceUpdateTradeEvent.
-
createClientRejectTradeEvent
Create a
TradeEventthat can be passed toto trigger the ClientReject transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of ClientRejectTradeEvent.
-
sendClientRejectEvent
Send a
TradeEventto trigger the ClientReject transition in the trade model of the adapter and client application- Parameters:
event- The event to send.
-
sendClientRejectEvent
public void sendClientRejectEvent()Send a
TradeEventwith no fields to trigger the ClientReject transition in the trade model of the adapter and client application -
createAcceptAckTradeEvent
Create a
TradeEventthat can be passed toto trigger the AcceptAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of AcceptAckTradeEvent.
-
sendAcceptAckEvent
Send a
TradeEventto trigger the AcceptAck transition in the trade model of the adapter and client application- Parameters:
event- The event to send.
-
sendAcceptAckEvent
public void sendAcceptAckEvent()Send a
TradeEventwith no fields to trigger the AcceptAck transition in the trade model of the adapter and client application -
createTradeConfirmedTradeEvent
Create a
TradeEventthat can be passed toto trigger the TradeConfirmed transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of TradeConfirmedTradeEvent.
-
sendTradeConfirmedEvent
Send a
TradeEventto trigger the TradeConfirmed transition in the trade model of the adapter and client application- Parameters:
event- The event to send.
-
sendTradeConfirmedEvent
Send a
TradeEventto trigger the TradeConfirmed transition in the trade model of the adapter and client application- Parameters:
message- The message to send.
-
createTradeConfirmedTradeEvent
@NotNull public @NotNull TradeConfirmedTradeEvent createTradeConfirmedTradeEvent(@NotNull @NotNull Message message) Create a
TradeEventthat can be passed toto trigger the TradeConfirmed transition in the trade model of the adapter and client applicationTrade.sendEvent- Parameters:
message- a Message to be passed to the TradeEvent- Returns:
- A new instance of TradeConfirmedTradeEvent.
-
createWithdrawAckTradeEvent
Create a
TradeEventthat can be passed toto trigger the WithdrawAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of WithdrawAckTradeEvent.
-
sendWithdrawAckEvent
Send a
TradeEventto trigger the WithdrawAck transition in the trade model of the adapter and client application- Parameters:
event- The event to send.
-
sendWithdrawAckEvent
public void sendWithdrawAckEvent()Send a
TradeEventwith no fields to trigger the WithdrawAck transition in the trade model of the adapter and client application -
createQuoteAckTradeEvent
Create a
TradeEventthat can be passed toto trigger the QuoteAck transition in the trade model of the adapter and client applicationTrade.sendEvent- Returns:
- A new instance of QuoteAckTradeEvent.
-
sendQuoteAckEvent
Send a
TradeEventto trigger the QuoteAck transition in the trade model of the adapter and client application- Parameters:
event- The event to send.
-
sendQuoteAckEvent
public void sendQuoteAckEvent()Send a
TradeEventwith no fields to trigger the QuoteAck transition in the trade model of the adapter and client application
-