Class BlockLifetimeEventHandler
java.lang.Object
com.caplin.motif.fx.ret.fxtrading.submission.FXTradeLifetimeEventHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
com.caplin.motif.fx.ret.fxtrading.submission.rfs.AbstractRFSLifetimeEventHandler
com.caplin.motif.fx.ret.fxtrading.submission.block.BlockLifetimeEventHandler
- All Implemented Interfaces:
com.caplin.generated.motif.fx.trading.rfs.RFSTradeListener,com.caplin.motif.datasource.CloseableTradeListener,ConversionRateListener,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 BlockLifetimeEventHandler
extends AbstractRFSLifetimeEventHandler
implements com.caplin.generated.motif.fx.trading.rfs.RFSTradeListener
-
Nested Class Summary
Nested classes/interfaces inherited from class com.caplin.motif.fx.ret.fxtrading.submission.rfs.AbstractRFSLifetimeEventHandler
AbstractRFSLifetimeEventHandler.TradeState -
Constructor Summary
ConstructorsConstructorDescriptionBlockLifetimeEventHandler(UserTradeInfo userTradeInfo, FxTradingAdapterInitialiser initialiser, BlockTradeBlotterDataProvider blotterDataProvider, BlockHandler tradeHandler, ConversionRateCurrencyPairProvider conversionRateCurrencyPairProvider, CrossCurrencyPairProvider crossCurrencyPairProvider, BlockTradePropertiesFactory blockTradePropertiesFactory, com.caplin.ret.trapi.concurrent.executor.SharedExecutorService<ExecutorService> serialExecutor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidconnectionRegistrationFailed(String reason) com.caplin.motif.datasource.MessagegetQuote(com.caplin.ret.trapi.fx.execution.QuoteEvent trapiQuote) Returns the quotecom.caplin.ret.trapi.fx.execution.MarketOrderbooleanisSwap()voidonClientClose(com.caplin.generated.motif.fx.trading.rfs.events.client.ClientCloseTradeEvent clientCloseTradeEvent) voidonDealHeld(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event) voidonDealLoggedError(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event) voidonDealPickedUp(com.caplin.ret.trapi.fx.execution.TradeEvent event) voidonDealSubmitError(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event) voidonExecute(com.caplin.generated.motif.fx.trading.rfs.events.client.ExecuteTradeEvent originalEvent) Triggered when a block trade is executedvoidonQuoteExpired(com.caplin.ret.trapi.fx.execution.TradeEvent event) voidonQuoteReceived(com.caplin.ret.trapi.fx.execution.QuoteEvent quoteEvent) voidonQuoteWithdrawn(com.caplin.ret.trapi.fx.execution.TradeEvent event) voidonSubmit(com.caplin.generated.motif.fx.trading.rfs.events.client.SubmitTradeEvent originalEvent) Triggered when a block trade is submittedvoidvoidreceiveEvent(com.caplin.trading.TradeEvent event) voidreceiveInvalidFieldsEvent(com.caplin.trading.InvalidFieldsEvent event) voidreceiveInvalidTransitionEvent(com.caplin.trading.InvalidTransitionEvent event) voidtradeClosed(com.caplin.trading.Trade trade) Methods inherited from class com.caplin.motif.fx.ret.fxtrading.submission.rfs.AbstractRFSLifetimeEventHandler
connectionAvailable, onConversionRateFailure, onConversionRateUpdate, onDealSubmitted, onQuoteDenied, onQuoteTimerUpdateMethods inherited from class com.caplin.motif.fx.ret.fxtrading.submission.FXTradeLifetimeEventHandler
onDealLoggedMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.caplin.generated.motif.fx.trading.rfs.RFSTradeListener
onAcceptWarning, onError, onRejectWarning, onResubmit, onUnhandledTradeEvent
-
Constructor Details
-
Method Details
-
onTradeClosed
public void onTradeClosed()- Specified by:
onTradeClosedin interfacecom.caplin.generated.motif.fx.trading.rfs.RFSTradeListener
-
close
public void close()- Overrides:
closein classFXTradeLifetimeEventHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
-
onClientClose
public void onClientClose(com.caplin.generated.motif.fx.trading.rfs.events.client.ClientCloseTradeEvent clientCloseTradeEvent) - Specified by:
onClientClosein interfacecom.caplin.generated.motif.fx.trading.rfs.RFSTradeListener
-
onDealPickedUp
public void onDealPickedUp(com.caplin.ret.trapi.fx.execution.TradeEvent event) - Specified by:
onDealPickedUpin interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onDealHeld
public void onDealHeld(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event) - Specified by:
onDealHeldin interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onQuoteReceived
public void onQuoteReceived(com.caplin.ret.trapi.fx.execution.QuoteEvent quoteEvent) - Specified by:
onQuoteReceivedin interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onQuoteWithdrawn
public void onQuoteWithdrawn(com.caplin.ret.trapi.fx.execution.TradeEvent event) - Specified by:
onQuoteWithdrawnin interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onQuoteExpired
public void onQuoteExpired(com.caplin.ret.trapi.fx.execution.TradeEvent event) - Specified by:
onQuoteExpiredin interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onDealSubmitError
public void onDealSubmitError(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event) - Specified by:
onDealSubmitErrorin interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
onDealLoggedError
public void onDealLoggedError(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event) - Specified by:
onDealLoggedErrorin interfacecom.caplin.ret.trapi.fx.execution.MarketOrderListener
-
connectionRegistrationFailed
- Specified by:
connectionRegistrationFailedin interfacecom.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.MarketOrderConnection>
-
onSubmit
public void onSubmit(com.caplin.generated.motif.fx.trading.rfs.events.client.SubmitTradeEvent originalEvent) Triggered when a block trade is submitted- Specified by:
onSubmitin interfacecom.caplin.generated.motif.fx.trading.rfs.RFSTradeListener- Parameters:
originalEvent- the BlockTradeSubmitEvent
-
onExecute
public void onExecute(com.caplin.generated.motif.fx.trading.rfs.events.client.ExecuteTradeEvent originalEvent) Triggered when a block trade is executed- Specified by:
onExecutein interfacecom.caplin.generated.motif.fx.trading.rfs.RFSTradeListener- Parameters:
originalEvent- the BlockTradeExecuteEvent
-
getQuote
public com.caplin.motif.datasource.Message getQuote(com.caplin.ret.trapi.fx.execution.QuoteEvent trapiQuote) throws QuoteCreationException Returns the quote- Parameters:
trapiQuote- the quote from RET- Returns:
- the FXQuote
- Throws:
QuoteCreationException
-
getTrapiTrade
public com.caplin.ret.trapi.fx.execution.MarketOrder getTrapiTrade()- Specified by:
getTrapiTradein classFXTradeLifetimeEventHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
-
tradeClosed
public void tradeClosed(com.caplin.trading.Trade trade) - Specified by:
tradeClosedin interfacecom.caplin.motif.datasource.CloseableTradeListener- Overrides:
tradeClosedin classFXTradeLifetimeEventHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
-
receiveEvent
public void receiveEvent(com.caplin.trading.TradeEvent event) throws com.caplin.trading.TradeException - Specified by:
receiveEventin interfacecom.caplin.trading.TradeListener- Throws:
com.caplin.trading.TradeException
-
receiveInvalidTransitionEvent
public void receiveInvalidTransitionEvent(com.caplin.trading.InvalidTransitionEvent event) - Specified by:
receiveInvalidTransitionEventin interfacecom.caplin.generated.motif.fx.trading.rfs.RFSTradeListener- Specified by:
receiveInvalidTransitionEventin interfacecom.caplin.trading.TradeListener
-
receiveInvalidFieldsEvent
public void receiveInvalidFieldsEvent(com.caplin.trading.InvalidFieldsEvent event) - Specified by:
receiveInvalidFieldsEventin interfacecom.caplin.generated.motif.fx.trading.rfs.RFSTradeListener- Specified by:
receiveInvalidFieldsEventin interfacecom.caplin.trading.TradeListener
-
isSwap
public boolean isSwap()- Specified by:
isSwapin classAbstractRFSLifetimeEventHandler
-