Class AbstractStrategyHandler<T extends com.caplin.motif.fx.trading.orders.submission.strategy.MotifOrderStrategy>
- java.lang.Object
-
- com.caplin.motif.fx.ret.orders.strategy.AbstractStrategyHandler<T>
-
- All Implemented Interfaces:
StrategyHandler
- Direct Known Subclasses:
IfDoneOCOStrategyHandler
,IfDoneStrategyHandler
,IfTimeoutStrategyHandler
,OCOStrategyHandler
,SingleStrategyHandler
public abstract class AbstractStrategyHandler<T extends com.caplin.motif.fx.trading.orders.submission.strategy.MotifOrderStrategy> extends java.lang.Object implements StrategyHandler
-
-
Constructor Summary
Constructors Constructor Description AbstractStrategyHandler(com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection> connectionPoolListener, T strategy, OrderAdapterInitialiser configuration, java.lang.String user, org.slf4j.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activatingTrade()
java.lang.Boolean
doNotActivate()
java.lang.String
getAssetClass()
java.util.List<java.lang.String>
getOrderIds()
Returns a list of order IDs in ascending order.com.caplin.motif.fx.trading.orders.submission.responder.OrderSubmittedResponder
getOrderSubmittedResponder()
java.lang.String
getParentTradeId()
java.lang.String
getRequestId()
T
getStrategy()
java.lang.String
getUser()
void
submitOrder(com.caplin.ret.trapi.fx.order.transaction.strategy.submit.OrderSubmissionTransaction transaction)
void
tradeActivated()
void
tradeSubmitError(java.lang.String reason)
-
-
-
Constructor Detail
-
AbstractStrategyHandler
public AbstractStrategyHandler(com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection> connectionPoolListener, T strategy, OrderAdapterInitialiser configuration, java.lang.String user, org.slf4j.Logger logger)
-
-
Method Detail
-
getOrderSubmittedResponder
public com.caplin.motif.fx.trading.orders.submission.responder.OrderSubmittedResponder getOrderSubmittedResponder()
- Specified by:
getOrderSubmittedResponder
in interfaceStrategyHandler
-
activatingTrade
public void activatingTrade()
- Specified by:
activatingTrade
in interfaceStrategyHandler
-
tradeActivated
public void tradeActivated()
- Specified by:
tradeActivated
in interfaceStrategyHandler
-
tradeSubmitError
public void tradeSubmitError(java.lang.String reason)
- Specified by:
tradeSubmitError
in interfaceStrategyHandler
-
getRequestId
public java.lang.String getRequestId()
- Specified by:
getRequestId
in interfaceStrategyHandler
-
submitOrder
public void submitOrder(com.caplin.ret.trapi.fx.order.transaction.strategy.submit.OrderSubmissionTransaction transaction)
- Specified by:
submitOrder
in interfaceStrategyHandler
-
getParentTradeId
public java.lang.String getParentTradeId()
- Specified by:
getParentTradeId
in interfaceStrategyHandler
-
getStrategy
public T getStrategy()
- Specified by:
getStrategy
in interfaceStrategyHandler
-
getUser
public java.lang.String getUser()
- Specified by:
getUser
in interfaceStrategyHandler
-
getAssetClass
public java.lang.String getAssetClass()
- Specified by:
getAssetClass
in interfaceStrategyHandler
-
doNotActivate
public java.lang.Boolean doNotActivate()
- Specified by:
doNotActivate
in interfaceStrategyHandler
-
getOrderIds
public java.util.List<java.lang.String> getOrderIds()
Description copied from interface:StrategyHandler
Returns a list of order IDs in ascending order.- Specified by:
getOrderIds
in interfaceStrategyHandler
-
-