Interface OrderConnectionRequestRouter

All Known Implementing Classes:
FixedOrderConnectionRequestRouter

public interface OrderConnectionRequestRouter
Routes connection requests to the appropriate connection.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.caplin.ret.trapi.connection.pool.ConnectionPool<com.caplin.ret.trapi.connection.OrderTradingConnection>
     
    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 the ConnectionPool
    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 the ConnectionPool
  • Method Details

    • initialise

      void initialise(OrderConnectionRequestRouter.Context context)
      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.

    • requestConnection

      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 the ConnectionPool

      You should use this method to perform any matching based on the request parameters to the most appropriate connection.

    • requestConnection

      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 the ConnectionPool

      You should use this method to perform any matching based on the request parameters to the most appropriate connection.

    • groupOrdersByConnection

      Map<String,List<BulkOrder>> groupOrdersByConnection(List<BulkOrder> bulkOrders)
      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.

    • getConnectionPool

      com.caplin.ret.trapi.connection.pool.ConnectionPool<com.caplin.ret.trapi.connection.OrderTradingConnection> getConnectionPool()