Package com.caplin.motif.fx.trading
Class TradeAdapter
java.lang.Object
com.caplin.motif.TradeAdapter
com.caplin.motif.fx.trading.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
ConstructorsConstructorDescriptionTradeAdapter(com.caplin.datasource.DataSource dataSource) Deprecated.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, Properties properties) Constructs the TradeAdapter that will utilise the specified DataSource and its configuration for communication with the motif. -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterPostAllocationTradeViewListener(SubjectParser<AllocationViewEvent> subjectParser, PostTradeAllocationViewListener listener) Deprecated.Methods inherited from class com.caplin.motif.TradeAdapter
addTradeChannelSessionListener, addUserSessionListener, getDataSource, registerTradeListenerFactory, removeUserSessionListener
-
Constructor Details
-
TradeAdapter
public TradeAdapter(com.caplin.datasource.DataSource dataSource, ThreadMode threadMode) throws 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:
IOException- If an error occurred reading configuration files for the adapter.
-
TradeAdapter
public TradeAdapter(com.caplin.datasource.DataSource dataSource, ThreadMode threadMode, Properties properties) throws 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:
IOException- If an error occurred reading configuration files for the adapter.
-
TradeAdapter
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:
IOException- If an error occurred reading configuration files for the adapter.
-
-
Method Details
-
registerPostAllocationTradeViewListener
@Deprecated public void registerPostAllocationTradeViewListener(SubjectParser<AllocationViewEvent> subjectParser, PostTradeAllocationViewListener listener) Deprecated.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.
-
TradeAdapter(DataSource, ThreadMode)