Class ESPLifetimeEventHandler
- java.lang.Object
-
- com.caplin.motif.fx.ret.fxtrading.submission.FXTradeLifetimeEventHandler<com.caplin.generated.motif.fx.trading.esp.ESPTrade>
-
- com.caplin.motif.fx.ret.fxtrading.submission.esp.ESPLifetimeEventHandler
-
- All Implemented Interfaces:
com.caplin.generated.motif.fx.trading.esp.ESPTradeListener
,com.caplin.motif.datasource.CloseableTradeListener
,com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.MarketOrderConnection>
,com.caplin.ret.trapi.fx.execution.MarketOrderListener
,com.caplin.trading.TradeListener
public class ESPLifetimeEventHandler extends FXTradeLifetimeEventHandler<com.caplin.generated.motif.fx.trading.esp.ESPTrade> implements com.caplin.generated.motif.fx.trading.esp.ESPTradeListener
Responds to events for a single trade.
-
-
Constructor Summary
Constructors Constructor Description ESPLifetimeEventHandler(FxTradingAdapterInitialiser adapterInitialiser, com.caplin.generated.motif.fx.trading.esp.ESPTrade trade, AbstractBlotterDataProvider<com.caplin.generated.motif.fx.trading.esp.ESPTrade> blotterDataProvider, UserTradeInfo userTradeInfo, ESPConfirmationFactory espConfirmationFactory, ESPTradePropertiesFactory espTradePropertiesFactory, com.caplin.ret.trapi.concurrent.executor.SharedExecutorService<java.util.concurrent.ExecutorService> serialExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connectionAvailable(com.caplin.ret.trapi.connection.MarketOrderConnection connection)
void
connectionRegistrationFailed(java.lang.String reason)
com.caplin.ret.trapi.fx.execution.MarketOrder
getTrapiTrade()
void
onClientClose(com.caplin.generated.motif.fx.trading.esp.events.client.ClientCloseTradeEvent event)
void
onDealHeld(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
void
onDealLoggedError(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
void
onDealPickedUp(com.caplin.ret.trapi.fx.execution.TradeEvent event)
void
onDealSubmitError(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
void
onDealSubmitted(com.caplin.ret.trapi.fx.execution.TradeEvent event)
void
onQuoteDenied(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
void
onQuoteExpired(com.caplin.ret.trapi.fx.execution.TradeEvent event)
void
onQuoteReceived(com.caplin.ret.trapi.fx.execution.QuoteEvent quote)
void
onQuoteTimerUpdate(com.caplin.ret.trapi.fx.execution.QuoteTimerEvent event)
void
onQuoteWithdrawn(com.caplin.ret.trapi.fx.execution.TradeEvent event)
void
onSubmit(com.caplin.generated.motif.fx.trading.esp.events.client.SubmitTradeEvent event)
void
onTradeClosed()
void
receiveEvent(com.caplin.trading.TradeEvent event)
void
receiveInvalidFieldsEvent(com.caplin.trading.InvalidFieldsEvent event)
void
receiveInvalidTransitionEvent(com.caplin.trading.InvalidTransitionEvent event)
void
releaseConnectionAndSendReject(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
-
Methods inherited from class com.caplin.motif.fx.ret.fxtrading.submission.FXTradeLifetimeEventHandler
close, onDealLogged, tradeClosed
-
-
-
-
Constructor Detail
-
ESPLifetimeEventHandler
public ESPLifetimeEventHandler(FxTradingAdapterInitialiser adapterInitialiser, com.caplin.generated.motif.fx.trading.esp.ESPTrade trade, AbstractBlotterDataProvider<com.caplin.generated.motif.fx.trading.esp.ESPTrade> blotterDataProvider, UserTradeInfo userTradeInfo, ESPConfirmationFactory espConfirmationFactory, ESPTradePropertiesFactory espTradePropertiesFactory, com.caplin.ret.trapi.concurrent.executor.SharedExecutorService<java.util.concurrent.ExecutorService> serialExecutor)
-
-
Method Detail
-
getTrapiTrade
public com.caplin.ret.trapi.fx.execution.MarketOrder getTrapiTrade()
- Specified by:
getTrapiTrade
in classFXTradeLifetimeEventHandler<com.caplin.generated.motif.fx.trading.esp.ESPTrade>
-
onSubmit
public void onSubmit(com.caplin.generated.motif.fx.trading.esp.events.client.SubmitTradeEvent event)
- Specified by:
onSubmit
in interfacecom.caplin.generated.motif.fx.trading.esp.ESPTradeListener
-
onClientClose
public void onClientClose(com.caplin.generated.motif.fx.trading.esp.events.client.ClientCloseTradeEvent event)
- Specified by:
onClientClose
in interfacecom.caplin.generated.motif.fx.trading.esp.ESPTradeListener
-
receiveEvent
public void receiveEvent(com.caplin.trading.TradeEvent event) throws com.caplin.trading.TradeException
- Specified by:
receiveEvent
in interfacecom.caplin.trading.TradeListener
- Throws:
com.caplin.trading.TradeException
-
receiveInvalidTransitionEvent
public void receiveInvalidTransitionEvent(com.caplin.trading.InvalidTransitionEvent event)
- Specified by:
receiveInvalidTransitionEvent
in interfacecom.caplin.generated.motif.fx.trading.esp.ESPTradeListener
- Specified by:
receiveInvalidTransitionEvent
in interfacecom.caplin.trading.TradeListener
-
receiveInvalidFieldsEvent
public void receiveInvalidFieldsEvent(com.caplin.trading.InvalidFieldsEvent event)
- Specified by:
receiveInvalidFieldsEvent
in interfacecom.caplin.generated.motif.fx.trading.esp.ESPTradeListener
- Specified by:
receiveInvalidFieldsEvent
in interfacecom.caplin.trading.TradeListener
-
onTradeClosed
public void onTradeClosed()
- Specified by:
onTradeClosed
in interfacecom.caplin.generated.motif.fx.trading.esp.ESPTradeListener
-
onDealSubmitted
public void onDealSubmitted(com.caplin.ret.trapi.fx.execution.TradeEvent event)
- Specified by:
onDealSubmitted
in interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onDealPickedUp
public void onDealPickedUp(com.caplin.ret.trapi.fx.execution.TradeEvent event)
- Specified by:
onDealPickedUp
in interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onDealHeld
public void onDealHeld(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
- Specified by:
onDealHeld
in interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onQuoteReceived
public void onQuoteReceived(com.caplin.ret.trapi.fx.execution.QuoteEvent quote)
- Specified by:
onQuoteReceived
in interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onQuoteWithdrawn
public void onQuoteWithdrawn(com.caplin.ret.trapi.fx.execution.TradeEvent event)
- Specified by:
onQuoteWithdrawn
in interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onQuoteExpired
public void onQuoteExpired(com.caplin.ret.trapi.fx.execution.TradeEvent event)
- Specified by:
onQuoteExpired
in interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onQuoteDenied
public void onQuoteDenied(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
- Specified by:
onQuoteDenied
in interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onDealSubmitError
public void onDealSubmitError(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
- Specified by:
onDealSubmitError
in interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onDealLoggedError
public void onDealLoggedError(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
- Specified by:
onDealLoggedError
in interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
releaseConnectionAndSendReject
public void releaseConnectionAndSendReject(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
-
onQuoteTimerUpdate
public void onQuoteTimerUpdate(com.caplin.ret.trapi.fx.execution.QuoteTimerEvent event)
- Specified by:
onQuoteTimerUpdate
in interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
connectionRegistrationFailed
public void connectionRegistrationFailed(java.lang.String reason)
- Specified by:
connectionRegistrationFailed
in interfacecom.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.MarketOrderConnection>
-
connectionAvailable
public void connectionAvailable(com.caplin.ret.trapi.connection.MarketOrderConnection connection)
- Specified by:
connectionAvailable
in interfacecom.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.MarketOrderConnection>
-
-