public class FixedOrderConnectionRequestRouter extends java.lang.Object implements OrderConnectionRequestRouter
OrderConnectionRequestRouter
that routes orders to the default connection.OrderConnectionRequestRouter.Context
Constructor and Description |
---|
FixedOrderConnectionRequestRouter() |
Modifier and Type | Method and Description |
---|---|
com.caplin.ret.trapi.connection.pool.ConnectionPool<com.caplin.ret.trapi.connection.OrderTradingConnection> |
getConnectionPool() |
java.util.Map<java.lang.String,java.util.List<BulkOrder>> |
groupOrdersByConnection(java.util.List<BulkOrder> bulkOrders)
This creates a partition based on the original list.
|
void |
initialise(OrderConnectionRequestRouter.Context context)
This notifies the ConnectionRequestRouter that it is about to be loaded.
|
void |
requestConnection(java.lang.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 the
ConnectionPool |
void |
requestConnection(java.lang.String retClientName,
java.lang.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 the
ConnectionPool |
public void initialise(OrderConnectionRequestRouter.Context context)
OrderConnectionRequestRouter
You should use this method to perform any initialization before the ConnectionRequestRouter is loaded by the system.
initialise
in interface OrderConnectionRequestRouter
public void requestConnection(java.lang.String retClientName, java.lang.String assetClass, com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection> listener)
OrderConnectionRequestRouter
ConnectionPool
You should use this method to perform any matching based on the request parameters to the most appropriate connection.
requestConnection
in interface OrderConnectionRequestRouter
public void requestConnection(java.lang.String connectionPoolKey, com.caplin.ret.trapi.connection.pool.ConnectionPoolListener<com.caplin.ret.trapi.connection.OrderTradingConnection> listener)
OrderConnectionRequestRouter
ConnectionPool
You should use this method to perform any matching based on the request parameters to the most appropriate connection.
requestConnection
in interface OrderConnectionRequestRouter
public java.util.Map<java.lang.String,java.util.List<BulkOrder>> groupOrdersByConnection(java.util.List<BulkOrder> bulkOrders)
OrderConnectionRequestRouter
You should use this method to process the set of related BulkActionOrder, and compute the connections required to successfully dispatch them.
groupOrdersByConnection
in interface OrderConnectionRequestRouter
public com.caplin.ret.trapi.connection.pool.ConnectionPool<com.caplin.ret.trapi.connection.OrderTradingConnection> getConnectionPool()
getConnectionPool
in interface OrderConnectionRequestRouter
Copyright © 2019 Caplin Systems.