Class ChangeStateListener
java.lang.Object
com.caplin.motif.fx.ret.orders.trading.ChangeStateListener
- All Implemented Interfaces:
OrderChangeActiveStateListener
,com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection>
public class ChangeStateListener
extends Object
implements OrderChangeActiveStateListener, com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection>
-
Constructor Summary
ConstructorsConstructorDescriptionChangeStateListener
(OrderAdapterInitialiser adapterServices, ChangeActiveState changeActiveState) -
Method Summary
Modifier and TypeMethodDescriptionvoid
connectionAvailable
(com.caplin.ret.trapi.connection.OrderTradingConnection connection) void
connectionRegistrationFailed
(String reason) void
Callback for when the trade is closedvoid
orderCancelWaitReceived
(ChangeActiveState activeState) Called when the client makes a request to cancel the timeout that is usually in place before the backend moves the request to pending.void
orderChangeActiveStateReceived
(ChangeActiveState changeActiveState) Called when the client makes a request to activate an order
-
Constructor Details
-
ChangeStateListener
public ChangeStateListener(OrderAdapterInitialiser adapterServices, ChangeActiveState changeActiveState)
-
-
Method Details
-
orderChangeActiveStateReceived
Description copied from interface:OrderChangeActiveStateListener
Called when the client makes a request to activate an order- Specified by:
orderChangeActiveStateReceived
in interfaceOrderChangeActiveStateListener
- Parameters:
changeActiveState
- The object representing the request from the client to change the state of the order to activated.
-
onTradeClosed
public void onTradeClosed()Description copied from interface:OrderChangeActiveStateListener
Callback for when the trade is closed- Specified by:
onTradeClosed
in interfaceOrderChangeActiveStateListener
-
orderCancelWaitReceived
Description copied from interface:OrderChangeActiveStateListener
Called when the client makes a request to cancel the timeout that is usually in place before the backend moves the request to pending.- Specified by:
orderCancelWaitReceived
in interfaceOrderChangeActiveStateListener
- Parameters:
activeState
- The object representing the request from the client to change the state of the order to activated.
-
connectionAvailable
public void connectionAvailable(com.caplin.ret.trapi.connection.OrderTradingConnection connection) - Specified by:
connectionAvailable
in interfacecom.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection>
-
connectionRegistrationFailed
- Specified by:
connectionRegistrationFailed
in interfacecom.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection>
-