Class AbstractStrategyHandler<T extends 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 MotifOrderStrategy>
extends Object
implements StrategyHandler
-
Constructor Summary
ConstructorDescriptionAbstractStrategyHandler
(com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection> connectionPoolListener, T strategy, OrderAdapterInitialiser configuration, String user, org.slf4j.Logger logger) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns a list of order IDs in ascending order.getUser()
void
submitOrder
(com.caplin.ret.trapi.fx.order.transaction.strategy.submit.OrderSubmissionTransaction transaction) void
void
tradeSubmitError
(String reason)
-
Constructor Details
-
AbstractStrategyHandler
public AbstractStrategyHandler(com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection> connectionPoolListener, T strategy, OrderAdapterInitialiser configuration, String user, org.slf4j.Logger logger)
-
-
Method Details
-
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
- Specified by:
tradeSubmitError
in interfaceStrategyHandler
-
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
- Specified by:
getParentTradeId
in interfaceStrategyHandler
-
getStrategy
- Specified by:
getStrategy
in interfaceStrategyHandler
-
getUser
- Specified by:
getUser
in interfaceStrategyHandler
-
getAssetClass
- Specified by:
getAssetClass
in interfaceStrategyHandler
-
doNotActivate
- Specified by:
doNotActivate
in interfaceStrategyHandler
-
getOrderIds
Description copied from interface:StrategyHandler
Returns a list of order IDs in ascending order.- Specified by:
getOrderIds
in interfaceStrategyHandler
-