public class BlockLifetimeEventHandler
extends java.lang.Object
implements com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.MarketOrderConnection>, com.caplin.motif.datasource.CloseableTradeListener, com.caplin.ret.trapi.fx.execution.MarketOrderListener, com.caplin.motif.fx.trading.block.BlockTradeListener
Constructor and Description |
---|
BlockLifetimeEventHandler(UserTradeInfo userTradeInfo,
FxTradingAdapterInitialiser initialiser,
AbstractBlockTradeBlotterDataProvider<com.caplin.motif.fx.trading.block.BlockTrade> blotterDataProvider,
BlockHandler tradeHandler,
BlockResponderProvider responderProvider) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
connectionAvailable(com.caplin.ret.trapi.connection.MarketOrderConnection connection) |
void |
connectionRegistrationFailed(java.lang.String reason) |
com.caplin.motif.datasource.Message |
getQuote(com.caplin.ret.trapi.fx.execution.QuoteEvent trapiQuote)
Returns the quote
|
void |
onClientClose() |
void |
onDealHeld(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event) |
void |
onDealLogged(com.caplin.ret.trapi.fx.execution.QuoteEvent quote) |
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)
Triggered when a block trade is submitted to RET
|
void |
onExecute(com.caplin.motif.fx.trading.block.event.BlockTradeExecuteEvent event)
Triggered when a block trade is executed
|
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 quoteEvent) |
void |
onQuoteTimerUpdate(com.caplin.ret.trapi.fx.execution.QuoteTimerEvent event) |
void |
onQuoteWithdrawn(com.caplin.ret.trapi.fx.execution.TradeEvent event) |
void |
onSubmit(com.caplin.motif.fx.trading.block.event.BlockTradeSubmitEvent event)
Triggered when a block trade is submitted
|
void |
onTradeClosed() |
void |
receiveEvent(com.caplin.trading.TradeEvent event) |
void |
receiveInvalidFieldsEvent(com.caplin.trading.InvalidFieldsEvent event) |
void |
receiveInvalidTransitionEvent(com.caplin.trading.InvalidTransitionEvent event) |
void |
tradeClosed(com.caplin.trading.Trade trade) |
public BlockLifetimeEventHandler(UserTradeInfo userTradeInfo, FxTradingAdapterInitialiser initialiser, AbstractBlockTradeBlotterDataProvider<com.caplin.motif.fx.trading.block.BlockTrade> blotterDataProvider, BlockHandler tradeHandler, BlockResponderProvider responderProvider)
public void onTradeClosed()
onTradeClosed
in interface com.caplin.motif.fx.trading.block.BlockTradeListener
public void close()
public void onClientClose()
onClientClose
in interface com.caplin.motif.fx.trading.block.BlockTradeListener
public void onDealPickedUp(com.caplin.ret.trapi.fx.execution.TradeEvent event)
onDealPickedUp
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
public void onDealHeld(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
onDealHeld
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
public void onDealLogged(com.caplin.ret.trapi.fx.execution.QuoteEvent quote)
onDealLogged
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
public void onQuoteReceived(com.caplin.ret.trapi.fx.execution.QuoteEvent quoteEvent)
onQuoteReceived
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
public void onQuoteWithdrawn(com.caplin.ret.trapi.fx.execution.TradeEvent event)
onQuoteWithdrawn
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
public void onQuoteExpired(com.caplin.ret.trapi.fx.execution.TradeEvent event)
onQuoteExpired
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
public void onQuoteDenied(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
onQuoteDenied
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
public void onDealSubmitError(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
onDealSubmitError
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
public void onDealLoggedError(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
onDealLoggedError
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
public void onQuoteTimerUpdate(com.caplin.ret.trapi.fx.execution.QuoteTimerEvent event)
onQuoteTimerUpdate
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
public void connectionRegistrationFailed(java.lang.String reason)
connectionRegistrationFailed
in interface com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.MarketOrderConnection>
public void connectionAvailable(com.caplin.ret.trapi.connection.MarketOrderConnection connection)
connectionAvailable
in interface com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.MarketOrderConnection>
public void onSubmit(com.caplin.motif.fx.trading.block.event.BlockTradeSubmitEvent event)
onSubmit
in interface com.caplin.motif.fx.trading.block.BlockTradeListener
event
- the BlockTradeSubmitEventpublic void onExecute(com.caplin.motif.fx.trading.block.event.BlockTradeExecuteEvent event)
onExecute
in interface com.caplin.motif.fx.trading.block.BlockTradeListener
event
- the BlockTradeExecuteEventpublic com.caplin.motif.datasource.Message getQuote(com.caplin.ret.trapi.fx.execution.QuoteEvent trapiQuote) throws QuoteCreationException
trapiQuote
- the quote from RETQuoteCreationException
public void tradeClosed(com.caplin.trading.Trade trade)
tradeClosed
in interface com.caplin.motif.datasource.CloseableTradeListener
public void receiveEvent(com.caplin.trading.TradeEvent event) throws com.caplin.trading.TradeException
receiveEvent
in interface com.caplin.trading.TradeListener
com.caplin.trading.TradeException
public void receiveInvalidTransitionEvent(com.caplin.trading.InvalidTransitionEvent event)
receiveInvalidTransitionEvent
in interface com.caplin.trading.TradeListener
public void receiveInvalidFieldsEvent(com.caplin.trading.InvalidFieldsEvent event)
receiveInvalidFieldsEvent
in interface com.caplin.trading.TradeListener
public void onDealSubmitted(com.caplin.ret.trapi.fx.execution.TradeEvent event)
onDealSubmitted
in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
event
- the Trade event submitted to RETCopyright © 2019 Caplin Systems.