Class FXOrderAdapter

    • Constructor Detail

      • FXOrderAdapter

        public FXOrderAdapter​(com.caplin.datasource.DataSource dataSource)
                       throws java.io.IOException
        Constructs an FXOrderAdapter that will utilise the specified DataSource and its configuration for communication with the motif.

        Uses a default ThreadMode of ThreadMode.SharedThreads

        Parameters:
        dataSource - The DataSource that will be used to receive requests for orders.
        Throws:
        java.io.IOException - If an error occurred reading configuration files for the adapter.
      • FXOrderAdapter

        public FXOrderAdapter​(com.caplin.datasource.DataSource dataSource,
                              ThreadMode threadMode)
                       throws java.io.IOException
        Constructs an FXOrderAdapter that will utilise the specified DataSource and its configuration for communication with the motif.
        Parameters:
        dataSource - The DataSource that will be used to receive requests for orders.
        threadMode - The thread mode to use for trades being made through the Adapter.
        Throws:
        java.io.IOException - If an error occurred reading configuration files for the adapter.
      • FXOrderAdapter

        public FXOrderAdapter​(com.caplin.datasource.DataSource dataSource,
                              ThreadMode threadMode,
                              java.util.Properties properties)
                       throws java.io.IOException
        Constructs an FXOrderAdapter that will utilise the specified DataSource and its configuration for communication with the motif.
        Parameters:
        dataSource - The DataSource that will be used to receive requests for orders.
        threadMode - The thread mode to use for trades being made through the Adapter.
        properties - The properties file to use when creating the TradingProvider
        Throws:
        java.io.IOException - If an error occurred reading configuration files for the adapter.
      • FXOrderAdapter

        public FXOrderAdapter​(TradeAdapter tradeAdapter)

        Constructs an FXOrderAdapter that will utilise the specified TradeAdapter and its configuration for communication with the motif.

        Prefer this constructor if you will be implementing multiple trade adapters in a single adapter.

        Parameters:
        tradeAdapter - The trade adapter