public class FXPostAllocationAdapter extends Object
An FXPostAllocationAdapter services trading capabalities for Post Allocations. This includes allocation of ESP, RFS and Limit Order trades that meet the criteria for allocation.
Typically, an FXPostAllocationAdapter will be set up as follows:
FXTradeAdapter tradeAdapter = new FXTradeAdapter(dataSource); FXPostAllocationAdapter fxPostAllocationAdapter = new FXPostAllocationAdapter(tradeAdapter); PostTradeAllocationListenerFactory factory = new MyPostTradeAllocationListenerFactoryImpl(); fxPostAllocationAdapter.registerPostAllocationTradeListenerFactory(factory);
Typically the same tradeAdapter that was passed to your FXOrdersAdapter will also be passed to the FXPostAllocationAdapter
Constructor and Description |
---|
FXPostAllocationAdapter(com.caplin.datasource.DataSource dataSource)
Constructs the FXPostAllocationAdapter that will utilise the
specified Datasource and its configuration for communication with the
Motif.
|
FXPostAllocationAdapter(com.caplin.datasource.DataSource dataSource,
ThreadMode threadMode)
Constructs the FXPostAllocationAdapter that will utilise the
specified Datasource and its configuration for communication with the
Motif.
|
FXPostAllocationAdapter(TradeAdapter tradeAdapter)
Constructs the FXPostAllocationAdapter that will utilise the
specified TradingAdapter and it's underlying Datasource
configuration for communication with the Motif.
|
Modifier and Type | Method and Description |
---|---|
void |
registerPostAllocationTradeListenerFactory(PostTradeAllocationListenerFactory factory)
Registers a factory that will listen to Post Allocation workflows initiated
from the client.
|
void |
registerPostAllocationTradeViewListener(PostTradeAllocationViewListener listener)
Registers the listener that will service the request to view the details
of already allocated trades.
|
void |
registerPostAllocationTradeViewListener(SubjectParser<AllocationViewEvent> subjectParser,
PostTradeAllocationViewListener listener)
Registers the listener that will service the request to view the details
of already allocated trades.
|
public FXPostAllocationAdapter(com.caplin.datasource.DataSource dataSource) throws IOException
Uses a default ThreadMode
of ThreadMode.SharedThreads
dataSource
- The Datasource that will be used to receive requests
for Post Allocation trades.IOException
- if an error occurred reading configuration files for
the adapter.public FXPostAllocationAdapter(com.caplin.datasource.DataSource dataSource, ThreadMode threadMode) throws IOException
dataSource
- The Datasource that will be used to receive requests for Post Allocation trades.threadMode
- The thread mode to use for trades being made through the Adapter.IOException
- if an error occurred reading configuration files for
the adapter.public FXPostAllocationAdapter(TradeAdapter tradeAdapter)
tradeAdapter
- The TradeAdapter containing the Datasource that will
be used to receive requests for Post Allocation
trades.public void registerPostAllocationTradeListenerFactory(PostTradeAllocationListenerFactory factory)
factory
- The factory that will be asked to create the PostTradeAllocationListenerpublic void registerPostAllocationTradeViewListener(SubjectParser<AllocationViewEvent> subjectParser, PostTradeAllocationViewListener listener)
Also registers a parser that will parse the request to a domain specific object.
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.public void registerPostAllocationTradeViewListener(PostTradeAllocationViewListener listener)
listener
- The listener that will be called to service the request to view details of already allocated trades.Copyright © 2018 Caplin Systems.