Package com.caplin.motif.fx.trading
Class TradeAdapter
- java.lang.Object
-
- com.caplin.motif.TradeAdapter
-
- com.caplin.motif.fx.trading.TradeAdapter
-
public class TradeAdapter extends TradeAdapter
A Trade adapter allows for listeners to listen and receive events when a trade has been initiated for a particular trade protocol.
-
-
Field Summary
-
Fields inherited from class com.caplin.motif.TradeAdapter
dataSource
-
-
Constructor Summary
Constructors Constructor Description TradeAdapter(com.caplin.datasource.DataSource dataSource)
Deprecated.Please useTradeAdapter(DataSource, ThreadMode)
TradeAdapter(com.caplin.datasource.DataSource dataSource, ThreadMode threadMode)
Constructs the TradeAdapter that will utilise the specified DataSource and its configuration for communication with the motif.TradeAdapter(com.caplin.datasource.DataSource dataSource, ThreadMode threadMode, java.util.Properties properties)
Constructs the TradeAdapter that will utilise the specified DataSource and its configuration for communication with the motif.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
registerPostAllocationTradeViewListener(SubjectParser<AllocationViewEvent> subjectParser, PostTradeAllocationViewListener listener)
Registers the listener that will service the request to view the allocations of an already allocated trade.-
Methods inherited from class com.caplin.motif.TradeAdapter
addTradeChannelSessionListener, addUserSessionListener, getDataSource, registerTradeListenerFactory, removeUserSessionListener
-
-
-
-
Constructor Detail
-
TradeAdapter
public TradeAdapter(com.caplin.datasource.DataSource dataSource, ThreadMode threadMode) throws java.io.IOException
Constructs the TradeAdapter 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 ESP and RFS trades.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.
-
TradeAdapter
public TradeAdapter(com.caplin.datasource.DataSource dataSource, ThreadMode threadMode, java.util.Properties properties) throws java.io.IOException
Constructs the TradeAdapter 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 ESP and RFS trades.threadMode
- The thread mode to use for trades being made through the Adapter.properties
- The properties file to use when creating theTradingProvider
- Throws:
java.io.IOException
- If an error occurred reading configuration files for the adapter.
-
TradeAdapter
@Deprecated public TradeAdapter(com.caplin.datasource.DataSource dataSource) throws java.io.IOException
Deprecated.Please useTradeAdapter(DataSource, ThreadMode)
Constructs the TradeAdapter 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 ESP and RFS trades.- Throws:
java.io.IOException
- If an error occurred reading configuration files for the adapter.
-
-
Method Detail
-
registerPostAllocationTradeViewListener
public void registerPostAllocationTradeViewListener(SubjectParser<AllocationViewEvent> subjectParser, PostTradeAllocationViewListener listener)
Registers the listener that will service the request to view the allocations of an already allocated trade.Also registers a parser that will parse the request to a domain specific object.
- Parameters:
subjectParser
- The parser that will parse the clients request to view allocations into a domain specific object.listener
- The listener that will be called to service the request to view details of already allocated trades.
-
-