Class RFSHandler

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String OVERALL_TIME_OUT  
    • Constructor Summary

      Constructors 
      Constructor Description
      RFSHandler​(com.caplin.generated.motif.fx.trading.rfs.RFSTrade trade, org.slf4j.Logger logger, RFSConfirmationFactory rfsConfirmationFactory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.caplin.generated.motif.fx.trading.rfs.events.server.ClientCloseAckTradeEvent createClientCloseAckEvent​(java.lang.String tradeId)  
      com.caplin.generated.motif.fx.trading.rfs.events.server.ExecuteAckTradeEvent createExecuteAckEvent​(java.lang.String tradeID)  
      com.caplin.generated.motif.fx.trading.rfs.events.server.ExpireTradeEvent createExpiredEvent​(java.lang.String tradeID)  
      com.caplin.generated.motif.fx.trading.rfs.events.server.HoldTradeEvent createHeldEvent​(java.lang.String tradeID)  
      com.caplin.generated.motif.fx.trading.rfs.events.server.PickUpTradeEvent createPickUpEvent​(java.lang.String tradeID)  
      com.caplin.generated.motif.fx.trading.rfs.events.server.PriceUpdateTradeEvent createQuoteEvent​(java.lang.String tradeID, long timePriceReceived, java.lang.String receivedNanotime, RFSQuote rfsQuote)  
      com.caplin.generated.motif.fx.trading.rfs.events.server.PriceUpdateTradeEvent createQuoteEvent​(java.lang.String tradeID, long timePriceReceived, java.lang.String receivedNanotime, RFSQuote rfsQuote, int timeout)  
      com.caplin.generated.motif.fx.trading.rfs.events.server.SubmitAckTradeEvent createSubmitAckEvent​(java.util.Map<java.lang.String,​java.lang.String> fields)  
      com.caplin.generated.motif.fx.trading.rfs.events.server.TradeConfirmationTradeEvent createTradeConfirmationEvent​(java.lang.String tradeID, com.caplin.ret.trapi.fx.execution.QuoteEvent quote)
      Takes a trapi quotes to create a trade confirmation.
      Note: Don't use the original trade to create the trade confirmation to ensure fields are updates correctly.
      com.caplin.generated.motif.fx.trading.rfs.events.server.WithdrawTradeEvent createWithdrawEvent​(java.lang.String tradeID)  
      java.util.Map<java.lang.String,​java.lang.String> getExtraFieldsFromTrade()  
      com.caplin.generated.motif.fx.trading.rfs.RFSTrade getTrade()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • OVERALL_TIME_OUT

        public static final java.lang.String OVERALL_TIME_OUT
        See Also:
        Constant Field Values
    • Constructor Detail

      • RFSHandler

        public RFSHandler​(com.caplin.generated.motif.fx.trading.rfs.RFSTrade trade,
                          org.slf4j.Logger logger,
                          RFSConfirmationFactory rfsConfirmationFactory)
    • Method Detail

      • getTrade

        public com.caplin.generated.motif.fx.trading.rfs.RFSTrade getTrade()
        Specified by:
        getTrade in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      • getExtraFieldsFromTrade

        public java.util.Map<java.lang.String,​java.lang.String> getExtraFieldsFromTrade()
        Specified by:
        getExtraFieldsFromTrade in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      • createTradeConfirmationEvent

        public com.caplin.generated.motif.fx.trading.rfs.events.server.TradeConfirmationTradeEvent createTradeConfirmationEvent​(java.lang.String tradeID,
                                                                                                                                com.caplin.ret.trapi.fx.execution.QuoteEvent quote)
                                                                                                                         throws java.lang.Exception
        Takes a trapi quotes to create a trade confirmation.
        Note: Don't use the original trade to create the trade confirmation to ensure fields are updates correctly.
        Specified by:
        createTradeConfirmationEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
        Throws:
        java.lang.Exception
      • createSubmitAckEvent

        public com.caplin.generated.motif.fx.trading.rfs.events.server.SubmitAckTradeEvent createSubmitAckEvent​(java.util.Map<java.lang.String,​java.lang.String> fields)
        Specified by:
        createSubmitAckEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      • createClientCloseAckEvent

        public com.caplin.generated.motif.fx.trading.rfs.events.server.ClientCloseAckTradeEvent createClientCloseAckEvent​(java.lang.String tradeId)
        Specified by:
        createClientCloseAckEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      • createPickUpEvent

        public com.caplin.generated.motif.fx.trading.rfs.events.server.PickUpTradeEvent createPickUpEvent​(java.lang.String tradeID)
        Specified by:
        createPickUpEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      • createWithdrawEvent

        public com.caplin.generated.motif.fx.trading.rfs.events.server.WithdrawTradeEvent createWithdrawEvent​(java.lang.String tradeID)
        Specified by:
        createWithdrawEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      • createExpiredEvent

        public com.caplin.generated.motif.fx.trading.rfs.events.server.ExpireTradeEvent createExpiredEvent​(java.lang.String tradeID)
        Specified by:
        createExpiredEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      • createQuoteEvent

        public com.caplin.generated.motif.fx.trading.rfs.events.server.PriceUpdateTradeEvent createQuoteEvent​(java.lang.String tradeID,
                                                                                                              long timePriceReceived,
                                                                                                              java.lang.String receivedNanotime,
                                                                                                              RFSQuote rfsQuote)
                                                                                                       throws java.lang.Exception
        Specified by:
        createQuoteEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
        Throws:
        java.lang.Exception
      • createQuoteEvent

        public com.caplin.generated.motif.fx.trading.rfs.events.server.PriceUpdateTradeEvent createQuoteEvent​(java.lang.String tradeID,
                                                                                                              long timePriceReceived,
                                                                                                              java.lang.String receivedNanotime,
                                                                                                              RFSQuote rfsQuote,
                                                                                                              int timeout)
                                                                                                       throws java.lang.Exception
        Specified by:
        createQuoteEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
        Throws:
        java.lang.Exception
      • createExecuteAckEvent

        public com.caplin.generated.motif.fx.trading.rfs.events.server.ExecuteAckTradeEvent createExecuteAckEvent​(java.lang.String tradeID)
        Specified by:
        createExecuteAckEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      • createHeldEvent

        public com.caplin.generated.motif.fx.trading.rfs.events.server.HoldTradeEvent createHeldEvent​(java.lang.String tradeID)
        Specified by:
        createHeldEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>