Class FixedOrderConnectionRequestRouter
java.lang.Object
com.caplin.motif.fx.ret.orders.extension.connection.FixedOrderConnectionRequestRouter
- All Implemented Interfaces:
OrderConnectionRequestRouter
public class FixedOrderConnectionRequestRouter
extends Object
implements OrderConnectionRequestRouter
An
OrderConnectionRequestRouter
that routes orders to the default connection.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.caplin.motif.fx.ret.orders.connection.OrderConnectionRequestRouter
OrderConnectionRequestRouter.Context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.caplin.ret.trapi.connection.pool.ConnectionPool<com.caplin.ret.trapi.connection.OrderTradingConnection>
groupOrdersByConnection
(List<BulkOrder> bulkOrders) This creates a partition based on the original list.void
This notifies the ConnectionRequestRouter that it is about to be loaded.void
requestConnection
(String connectionPoolKey, com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection> listener) This routes a connection request to a connection from theConnectionPool
void
requestConnection
(String retClientName, String assetClass, com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection> listener) This routes a connection request to a connection from theConnectionPool
-
Constructor Details
-
FixedOrderConnectionRequestRouter
public FixedOrderConnectionRequestRouter()
-
-
Method Details
-
initialise
Description copied from interface:OrderConnectionRequestRouter
This notifies the ConnectionRequestRouter that it is about to be loaded. This method will be called by the system once.You should use this method to perform any initialization before the ConnectionRequestRouter is loaded by the system.
- Specified by:
initialise
in interfaceOrderConnectionRequestRouter
-
requestConnection
public void requestConnection(String retClientName, String assetClass, com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection> listener) Description copied from interface:OrderConnectionRequestRouter
This routes a connection request to a connection from theConnectionPool
You should use this method to perform any matching based on the request parameters to the most appropriate connection.
- Specified by:
requestConnection
in interfaceOrderConnectionRequestRouter
-
requestConnection
public void requestConnection(String connectionPoolKey, com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection> listener) Description copied from interface:OrderConnectionRequestRouter
This routes a connection request to a connection from theConnectionPool
You should use this method to perform any matching based on the request parameters to the most appropriate connection.
- Specified by:
requestConnection
in interfaceOrderConnectionRequestRouter
-
groupOrdersByConnection
Description copied from interface:OrderConnectionRequestRouter
This creates a partition based on the original list.You should use this method to process the set of related BulkActionOrder, and compute the connections required to successfully dispatch them.
- Specified by:
groupOrdersByConnection
in interfaceOrderConnectionRequestRouter
-
getConnectionPool
public com.caplin.ret.trapi.connection.pool.ConnectionPool<com.caplin.ret.trapi.connection.OrderTradingConnection> getConnectionPool()- Specified by:
getConnectionPool
in interfaceOrderConnectionRequestRouter
-