Class FXOrderAdapter

java.lang.Object
com.caplin.motif.datasource.CachedAdapter
com.caplin.motif.fx.orders.FXOrderAdapter

public class FXOrderAdapter extends CachedAdapter
  • Constructor Details

    • FXOrderAdapter

      public FXOrderAdapter(com.caplin.datasource.DataSource dataSource) throws 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:
      IOException - If an error occurred reading configuration files for the adapter.
    • FXOrderAdapter

      public FXOrderAdapter(com.caplin.datasource.DataSource dataSource, ThreadMode threadMode) throws 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:
      IOException - If an error occurred reading configuration files for the adapter.
    • FXOrderAdapter

      public FXOrderAdapter(com.caplin.datasource.DataSource dataSource, ThreadMode threadMode, Properties properties) throws 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:
      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
  • Method Details