Class RFSHandler
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 Summary
-
Constructor Summary
ConstructorDescriptionRFSHandler
(com.caplin.generated.motif.fx.trading.rfs.RFSTrade trade, org.slf4j.Logger logger, RFSConfirmationFactory rfsConfirmationFactory) -
Method Summary
Modifier and TypeMethodDescriptioncom.caplin.generated.motif.fx.trading.rfs.events.server.ClientCloseAckTradeEvent
createClientCloseAckEvent
(String tradeId) com.caplin.generated.motif.fx.trading.rfs.events.server.ExecuteAckTradeEvent
createExecuteAckEvent
(String tradeID) com.caplin.generated.motif.fx.trading.rfs.events.server.ExpireTradeEvent
createExpiredEvent
(String tradeID) com.caplin.generated.motif.fx.trading.rfs.events.server.HoldTradeEvent
createHeldEvent
(String tradeID) com.caplin.generated.motif.fx.trading.rfs.events.server.PickUpTradeEvent
createPickUpEvent
(String tradeID) com.caplin.generated.motif.fx.trading.rfs.events.server.PriceUpdateTradeEvent
createQuoteEvent
(String tradeID, long timePriceReceived, String receivedNanotime, RFSQuote rfsQuote) com.caplin.generated.motif.fx.trading.rfs.events.server.PriceUpdateTradeEvent
createQuoteEvent
(String tradeID, long timePriceReceived, String receivedNanotime, RFSQuote rfsQuote, int timeout) com.caplin.generated.motif.fx.trading.rfs.events.server.SubmitAckTradeEvent
createSubmitAckEvent
(Map<String, String> fields) com.caplin.generated.motif.fx.trading.rfs.events.server.TradeConfirmationTradeEvent
createTradeConfirmationEvent
(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
(String tradeID) 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
Methods inherited from interface com.caplin.motif.fx.ret.fxtrading.submission.rfs.events.TradeTypeHandler
getLegCount, getLegExecutionSides, getQuote, getTradeType, isTwoWay, setupTradeLeg
-
Field Details
-
OVERALL_TIME_OUT
- See Also:
-
-
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 interfaceTradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
-
getExtraFieldsFromTrade
- Specified by:
getExtraFieldsFromTrade
in interfaceTradeTypeHandler<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 interfaceTradeTypeHandler<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 interfaceTradeTypeHandler<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 interfaceTradeTypeHandler<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 interfaceTradeTypeHandler<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 interfaceTradeTypeHandler<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 interfaceTradeTypeHandler<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 interfaceTradeTypeHandler<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 interfaceTradeTypeHandler<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 interfaceTradeTypeHandler<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 interfaceTradeTypeHandler<com.caplin.generated.motif.fx.trading.rfs.RFSTrade>
-