java.lang.Object
com.caplin.motif.fx.ret.fxtrading.submission.rfs.events.RFSHandler
All Implemented Interfaces:
TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
Direct Known Subclasses:
ForwardHandler, SpotHandler, SwapHandler, TimeOptionHandler

public abstract class RFSHandler extends Object implements TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
  • Field Details

  • Constructor Details

    • RFSHandler

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

    • 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 Map<String,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(String tradeID, com.caplin.ret.trapi.fx.execution.QuoteEvent quote) throws 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:
      Exception
    • createSubmitAckEvent

      public com.caplin.generated.motif.fx.trading.rfs.events.server.SubmitAckTradeEvent createSubmitAckEvent(Map<String,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(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(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(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(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(String tradeID, long timePriceReceived, String receivedNanotime, RFSQuote rfsQuote) throws Exception
      Specified by:
      createQuoteEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
      Throws:
      Exception
    • createQuoteEvent

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

      public com.caplin.generated.motif.fx.trading.rfs.events.server.ExecuteAckTradeEvent createExecuteAckEvent(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(String tradeID)
      Specified by:
      createHeldEvent in interface TradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>