public class EditStrategyTrade extends UserTrade
A single EditStrategyTrade 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 and Description |
---|
EditStrategyTrade(com.caplin.trading.Trade backingTrade,
ScheduledExecutorService executorService)
Constructor used by the generated code.
|
Modifier and Type | Method and Description |
---|---|
ClientCloseAckTradeEvent |
createClientCloseAckTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the ClientCloseAck state. |
EditAcceptTradeEvent |
createEditAcceptTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the EditAccept state. |
EditAcceptTradeEvent |
createEditAcceptTradeEvent(Message message)
Create a
TradeEvent that can be used to trigger the trade to transition into the EditAccept state. |
EditOpenAckTradeEvent |
createEditOpenAckTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the EditOpenAck state. |
ErrorTradeEvent |
createErrorTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the Error state. |
ErrorTradeEvent |
createErrorTradeEvent(Message message)
Create a
TradeEvent that can be used to trigger the trade to transition into the Error state. |
RefreshTradeEvent |
createRefreshTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the Refresh state. |
SaveAcceptTradeEvent |
createSaveAcceptTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the SaveAccept state. |
SaveAcceptTradeEvent |
createSaveAcceptTradeEvent(Message message)
Create a
TradeEvent that can be used to trigger the trade to transition into the SaveAccept state. |
SaveAndCompleteTradeEvent |
createSaveAndCompleteTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the SaveAndComplete state. |
SaveAndCompleteTradeEvent |
createSaveAndCompleteTradeEvent(Message message)
Create a
TradeEvent that can be used to trigger the trade to transition into the SaveAndComplete state. |
ValidationErrorTradeEvent |
createValidationErrorTradeEvent()
Create a
TradeEvent that can be used to trigger the trade to transition into the ValidationError state. |
ValidationErrorTradeEvent |
createValidationErrorTradeEvent(Message message)
Create a
TradeEvent that can be used to trigger the trade to transition into the ValidationError state. |
void |
sendClientCloseAckEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the ClientCloseAck state. |
void |
sendClientCloseAckEvent(ClientCloseAckTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the ClientCloseAck state. |
void |
sendEditAcceptEvent(EditAcceptTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the EditAccept state. |
void |
sendEditAcceptEvent(Message message)
Send a
TradeEvent to trigger the trade to transition into the EditAccept state. |
void |
sendEditOpenAckEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the EditOpenAck state. |
void |
sendEditOpenAckEvent(EditOpenAckTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the EditOpenAck state. |
void |
sendErrorEvent(ErrorTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the Error state. |
void |
sendErrorEvent(Message message)
Send a
TradeEvent to trigger the trade to transition into the Error state. |
void |
sendRefreshEvent()
Send a
TradeEvent with no fields to trigger the trade to transition into the Refresh state. |
void |
sendRefreshEvent(RefreshTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the Refresh state. |
void |
sendSaveAcceptEvent(Message message)
Send a
TradeEvent to trigger the trade to transition into the SaveAccept state. |
void |
sendSaveAcceptEvent(SaveAcceptTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the SaveAccept state. |
void |
sendSaveAndCompleteEvent(Message message)
Send a
TradeEvent to trigger the trade to transition into the SaveAndComplete state. |
void |
sendSaveAndCompleteEvent(SaveAndCompleteTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the SaveAndComplete state. |
void |
sendValidationErrorEvent(Message message)
Send a
TradeEvent to trigger the trade to transition into the ValidationError state. |
void |
sendValidationErrorEvent(ValidationErrorTradeEvent event)
Send a
TradeEvent to trigger the trade to transition into the ValidationError state. |
getBackingTrade, getExecutorService, getRequestID, getUsername, toString
public EditStrategyTrade(com.caplin.trading.Trade backingTrade, ScheduledExecutorService executorService)
Constructor used by the generated code.
public ErrorTradeEvent createErrorTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the Error state.
public void sendErrorEvent(ErrorTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the Error state.
event
- The event to send.public void sendErrorEvent(Message message)
Send a TradeEvent
to trigger the trade to transition into the Error state.
message
- The message to send.public ErrorTradeEvent createErrorTradeEvent(Message message)
Create a TradeEvent
that can be used to trigger the trade to transition into the Error state.
public EditOpenAckTradeEvent createEditOpenAckTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the EditOpenAck state.
public void sendEditOpenAckEvent(EditOpenAckTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the EditOpenAck state.
event
- The event to send.public void sendEditOpenAckEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the EditOpenAck state.
public ClientCloseAckTradeEvent createClientCloseAckTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the ClientCloseAck state.
public void sendClientCloseAckEvent(ClientCloseAckTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the ClientCloseAck state.
event
- The event to send.public void sendClientCloseAckEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the ClientCloseAck state.
public RefreshTradeEvent createRefreshTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the Refresh state.
public void sendRefreshEvent(RefreshTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the Refresh state.
event
- The event to send.public void sendRefreshEvent()
Send a TradeEvent
with no fields to trigger the trade to transition into the Refresh state.
public EditAcceptTradeEvent createEditAcceptTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the EditAccept state.
public void sendEditAcceptEvent(EditAcceptTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the EditAccept state.
event
- The event to send.public void sendEditAcceptEvent(Message message)
Send a TradeEvent
to trigger the trade to transition into the EditAccept state.
message
- The message to send.public EditAcceptTradeEvent createEditAcceptTradeEvent(Message message)
Create a TradeEvent
that can be used to trigger the trade to transition into the EditAccept state.
public SaveAndCompleteTradeEvent createSaveAndCompleteTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the SaveAndComplete state.
public void sendSaveAndCompleteEvent(SaveAndCompleteTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the SaveAndComplete state.
event
- The event to send.public void sendSaveAndCompleteEvent(Message message)
Send a TradeEvent
to trigger the trade to transition into the SaveAndComplete state.
message
- The message to send.public SaveAndCompleteTradeEvent createSaveAndCompleteTradeEvent(Message message)
Create a TradeEvent
that can be used to trigger the trade to transition into the SaveAndComplete state.
public SaveAcceptTradeEvent createSaveAcceptTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the SaveAccept state.
public void sendSaveAcceptEvent(SaveAcceptTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the SaveAccept state.
event
- The event to send.public void sendSaveAcceptEvent(Message message)
Send a TradeEvent
to trigger the trade to transition into the SaveAccept state.
message
- The message to send.public SaveAcceptTradeEvent createSaveAcceptTradeEvent(Message message)
Create a TradeEvent
that can be used to trigger the trade to transition into the SaveAccept state.
public ValidationErrorTradeEvent createValidationErrorTradeEvent()
Create a TradeEvent
that can be used to trigger the trade to transition into the ValidationError state.
public void sendValidationErrorEvent(ValidationErrorTradeEvent event)
Send a TradeEvent
to trigger the trade to transition into the ValidationError state.
event
- The event to send.public void sendValidationErrorEvent(Message message)
Send a TradeEvent
to trigger the trade to transition into the ValidationError state.
message
- The message to send.public ValidationErrorTradeEvent createValidationErrorTradeEvent(Message message)
Create a TradeEvent
that can be used to trigger the trade to transition into the ValidationError state.
Copyright © 2018 Caplin Systems.