Class 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
    • Method Detail

      • onTradeClosed

        public void onTradeClosed()
        Specified by:
        onTradeClosed in interface com.caplin.generated.motif.fx.trading.rfs.RFSTradeListener
      • onClientClose

        public void onClientClose​(com.caplin.generated.motif.fx.trading.rfs.events.client.ClientCloseTradeEvent clientCloseTradeEvent)
        Specified by:
        onClientClose in interface com.caplin.generated.motif.fx.trading.rfs.RFSTradeListener
      • onDealPickedUp

        public void onDealPickedUp​(com.caplin.ret.trapi.fx.execution.TradeEvent event)
        Specified by:
        onDealPickedUp in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
      • onDealHeld

        public void onDealHeld​(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
        Specified by:
        onDealHeld in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
      • onQuoteReceived

        public void onQuoteReceived​(com.caplin.ret.trapi.fx.execution.QuoteEvent quoteEvent)
        Specified by:
        onQuoteReceived in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
      • onQuoteWithdrawn

        public void onQuoteWithdrawn​(com.caplin.ret.trapi.fx.execution.TradeEvent event)
        Specified by:
        onQuoteWithdrawn in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
      • onQuoteExpired

        public void onQuoteExpired​(com.caplin.ret.trapi.fx.execution.TradeEvent event)
        Specified by:
        onQuoteExpired in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
      • onDealSubmitError

        public void onDealSubmitError​(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
        Specified by:
        onDealSubmitError in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
      • onDealLoggedError

        public void onDealLoggedError​(com.caplin.ret.trapi.fx.execution.TradeErrorEvent event)
        Specified by:
        onDealLoggedError in interface com.caplin.ret.trapi.fx.execution.MarketOrderListener
      • connectionRegistrationFailed

        public void connectionRegistrationFailed​(java.lang.String reason)
        Specified by:
        connectionRegistrationFailed in interface com.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:
        onSubmit in interface com.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:
        onExecute in interface com.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:
        getTrapiTrade in class FXTradeLifetimeEventHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      • tradeClosed

        public void tradeClosed​(com.caplin.trading.Trade trade)
        Specified by:
        tradeClosed in interface com.caplin.motif.datasource.CloseableTradeListener
        Overrides:
        tradeClosed in class FXTradeLifetimeEventHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      • receiveEvent

        public void receiveEvent​(com.caplin.trading.TradeEvent event)
                          throws com.caplin.trading.TradeException
        Specified by:
        receiveEvent in interface com.caplin.trading.TradeListener
        Throws:
        com.caplin.trading.TradeException
      • receiveInvalidTransitionEvent

        public void receiveInvalidTransitionEvent​(com.caplin.trading.InvalidTransitionEvent event)
        Specified by:
        receiveInvalidTransitionEvent in interface com.caplin.generated.motif.fx.trading.rfs.RFSTradeListener
        Specified by:
        receiveInvalidTransitionEvent in interface com.caplin.trading.TradeListener
      • receiveInvalidFieldsEvent

        public void receiveInvalidFieldsEvent​(com.caplin.trading.InvalidFieldsEvent event)
        Specified by:
        receiveInvalidFieldsEvent in interface com.caplin.generated.motif.fx.trading.rfs.RFSTradeListener
        Specified by:
        receiveInvalidFieldsEvent in interface com.caplin.trading.TradeListener