public class FxTradingConfigurationBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADAPTER_NAME |
Constructor and Description |
---|
FxTradingConfigurationBuilder()
This class produces a FxTradingConfiguration which can be used to instantiate a
FxTradingAdapter . |
public static final java.lang.String ADAPTER_NAME
public FxTradingConfigurationBuilder() throws ConfigurationLoaderException
FxTradingAdapter
.ConfigurationLoaderException
public FxTradingConfigurationBuilder setBlotterItemFieldsUpdater(TradeBlotterItemFieldsUpdater fieldsUpdater)
TradeBlotterItemFieldsUpdater
to override the
FxTradingAdapter's default BlotterItemFieldsUpdater. The BlotterItemFieldsUpdater allows the user to receive
fields to be sent for a blotter record. The custom BlotterItemFieldsUpdater can change, add, remove fields
on the record.fieldsUpdater
- A custom TradeBlotterItemFieldsUpdater
TradeBlotterItemFieldsUpdater
public FxTradingConfigurationBuilder setUserManager(UserManager userManager)
UserManager
to override the FxTradingAdapter's default UserManager.userManager
- a custom UserManager
UserManager
public FxTradingConfigurationBuilder setAdapterConfigurationListener(AdapterConfigurationListener listener)
AdapterConfigurationListener
to load custom configurations.listener
- The listener that will receive a callback to load custom configurationsAdapterConfigurationListener
public FxTradingConfigurationBuilder setESPCustomFieldValuesFactory(CustomFieldValuesFactory<com.caplin.generated.motif.fx.trading.esp.ESPTrade,ESPTradeProperties> espCustomFieldValuesFactory)
CustomFieldValuesFactory
used to create custom CustomFieldValues
objects for ESP trades.
The resulting CustomFieldValues
objects will be serialised and stored in the TakerOrderCustom field of the ESP trade.espCustomFieldValuesFactory
- The custom factory to use to create
CustomFieldValues
objects for ESP tradespublic FxTradingConfigurationBuilder setRFSCustomFieldValuesFactory(CustomFieldValuesFactory<com.caplin.generated.motif.fx.trading.rfs.RFSTrade,RFSTradeProperties> rfsCustomFieldValuesFactory)
CustomFieldValuesFactory
used to create custom
CustomFieldValues
objects for RFS trades.
The resulting CustomFieldValues
objects will be serialised and
stored in the TakerOrderCustom field of the RFS trade.rfsCustomFieldValuesFactory
- The custom factory to use to create
CustomFieldValues
objects for RFS tradespublic FxTradingConfigurationBuilder setBlockTradeCustomFieldValuesFactory(CustomFieldValuesFactory<com.caplin.motif.fx.trading.block.BlockTrade,BlockTradeProperties> blockTradeCustomFieldValuesFactory)
CustomFieldValuesFactory
used to create custom
CustomFieldValues
objects for block trades.
The resulting CustomFieldValues
objects will be serialised and
stored in the TakerOrderCustom field of the block trade.blockTradeCustomFieldValuesFactory
- The custom factory to use to create
CustomFieldValues
objects for block tradespublic FxTradingConfigurationBuilder setCustomFieldValuesSerialiser(CustomFieldValuesSerialiser customFieldValuesSerialiser)
CustomFieldValuesSerialiser
used to
serialise/deserialise CustomFieldValues
objects for ESP trades.
The resulting serialised objects will be stored in the TakerOrderCustom field of the ESP trade.customFieldValuesSerialiser
- The custom serialiser to use when serialising/deserialising
CustomFieldValues
objects for ESP tradespublic FxTradingConfigurationBuilder setDataSource(com.caplin.datasource.DataSource dataSource)
DataSource
to extend the
FxTradingAdapter's default behaviour.dataSource
- a custom DataSource
DataSource
public FxTradingConfigurationBuilder setAccountManager(FxTradingAccountManager accountManager)
FxTradingAccountManager
to extend the
FxTradingAdapter's default behaviour.accountManager
- a custom FxTradingAccountManager
public FxTradingConfigurationBuilder setRFSStateEventFactory(RFSStateEventFactory RFSStateEventFactory)
RFSStateEventFactory
to extend the
FxTradingAdapter's default behaviour for RFS Trades.RFSStateEventFactory
- a custom RFSStateEventFactory
public FxTradingConfigurationBuilder setBlockTradeListenerEventInfoFactory(BlockStateEventFactory blockTradeListenerEventInfoFactory)
BlockStateEventFactory
to extend the
FxTradingAdapter's default behaviour for Block Trades.blockTradeListenerEventInfoFactory
- a custom BlockStateEventFactory
public FxTradingConfigurationBuilder setConfigurationLoader(ConfigurationLoader configurationLoader)
ConfigurationLoader
to replace the default.configurationLoader
- a custom ConfigurationLoader
ConfigurationLoader
public FxTradingConfigurationBuilder setInstrumentProvider(InstrumentProvider instrumentProvider)
InstrumentProvider
to replace the default FxCrossInstrumentProvider
.instrumentProvider
- a custom InstrumentProvider
public FxTradingConfigurationBuilder setQuoteFactory(QuoteFactory quoteFactory)
QuoteFactory
to replace the default DefaultQuoteFactory
.quoteFactory
- a custom QuoteFactory
public FxTradingConfigurationBuilder setSalesQuoteFactory(SalesQuoteFactory salesQuoteFactory)
SalesQuoteFactory
to replace the default DefaultSalesQuoteFactory
.salesQuoteFactory
- a custom SalesQuoteFactory
public FxTradingConfigurationBuilder setBlockQuoteFactory(BlockQuoteFactory blockQuoteFactory)
BlockQuoteFactory
to replace the default DefaultBlockQuoteFactory
.blockQuoteFactory
- a custom BlockQuoteFactory
public FxTradingConfigurationBuilder setSwapQuoteFactory(SwapQuoteFactory swapQuoteFactory)
SwapQuoteFactory
to replace the default DefaultSwapQuoteFactory
.swapQuoteFactory
- a custom SwapQuoteFactory
public FxTradingConfigurationBuilder setSalesSwapQuoteFactory(SalesSwapQuoteFactory salesSwapQuoteFactory)
SalesSwapQuoteFactory
to replace the default DefaultSalesSwapQuoteFactory
.salesSwapQuoteFactory
- a custom SalesSwapQuoteFactory
public FxTradingConfigurationBuilder setTradingConnectionRouter(TradingConnectionRouter tradingConnectionRouter)
TradingConnectionRouter
. There is no default implementation.tradingConnectionRouter
- a custom TradingConnectionRouter
public FxTradingConfiguration build()
Copyright © 2019 Caplin Systems.