Class PricingAdapterConfigurationBuilder
java.lang.Object
com.caplin.motif.fx.ret.pricing.config.PricingAdapterConfigurationBuilder
This class produces a PricingAdapterConfiguration which can be used to instantiate an PricingAdapter.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionThis class produces a PricingAdapterConfiguration which can be used to instantiate aPricingAdapter
.PricingAdapterConfigurationBuilder
(ConfigurationLoader configurationLoader) -
Method Summary
Modifier and TypeMethodDescriptionaddSubjectMapper
(SubjectMapper subjectMapper) Adds a customSubjectMapper
to extend the PricingAdapter's default subscription behaviour.build()
Creates an instance of PricingAdapterConfiguration which can be used to instantiate a PricingAdapter.Sets a customAdapterConfigurationListener
to extend the PricingAdapter's default behaviour.setAdapterName
(String adapterName) Overrides the default adapter namesetConfigurationLoader
(ConfigurationLoader configurationLoader) Sets a customConfigurationLoader
to replace the PricingAdapter's default behaviour.setDataSource
(com.caplin.datasource.DataSource dataSource) Sets a customDataSource
to extend the PricingAdapter's default behaviour.setInstrumentProvider
(InstrumentProvider instrumentProvider) Sets a customInstrumentProvider
to replace the default InstrumentProvidersetRatesServiceProvider
(RatesServiceProvider ratesServiceProvider) Sets a customRatesServiceProvider
to replace the default RatesServiceProvider.setSubscriptionParserFactory
(SubscriptionRequestFactory subscriptionParserFactory) Sets a customSubscriptionRequestFactory
to replace the default PricingSubscriptionParserFactory of the standard TrAPI connection.setUserManager
(UserManager userManager) Sets a customUserManager
to extend the PricingAdapter's default behaviour.
-
Field Details
-
ADAPTER_NAME
- See Also:
-
-
Constructor Details
-
PricingAdapterConfigurationBuilder
This class produces a PricingAdapterConfiguration which can be used to instantiate aPricingAdapter
.- Throws:
ConfigurationLoaderException
-
PricingAdapterConfigurationBuilder
public PricingAdapterConfigurationBuilder(ConfigurationLoader configurationLoader) throws ConfigurationLoaderException - Throws:
ConfigurationLoaderException
-
-
Method Details
-
setUserManager
Sets a customUserManager
to extend the PricingAdapter's default behaviour.- Parameters:
userManager
- a customUserManager
- Returns:
- the PricingAdapterConfigurationBuilder
- See Also:
-
setAdapterConfigurationListener
public PricingAdapterConfigurationBuilder setAdapterConfigurationListener(AdapterConfigurationListener listener) Sets a customAdapterConfigurationListener
to extend the PricingAdapter's default behaviour.- Parameters:
listener
- a customAdapterConfigurationListener
- Returns:
- the PermissioningAdapterConfigurationBuilder
- See Also:
-
setDataSource
public PricingAdapterConfigurationBuilder setDataSource(com.caplin.datasource.DataSource dataSource) Sets a customDataSource
to extend the PricingAdapter's default behaviour.- Parameters:
dataSource
- a customDataSource
- Returns:
- the PricingAdapterConfigurationBuilder
- See Also:
-
DataSource
-
setConfigurationLoader
public PricingAdapterConfigurationBuilder setConfigurationLoader(ConfigurationLoader configurationLoader) Sets a customConfigurationLoader
to replace the PricingAdapter's default behaviour.- Parameters:
configurationLoader
- a customConfigurationLoader
- Returns:
- the PricingAdapterConfigurationBuilder
- See Also:
-
setRatesServiceProvider
public PricingAdapterConfigurationBuilder setRatesServiceProvider(RatesServiceProvider ratesServiceProvider) Sets a customRatesServiceProvider
to replace the default RatesServiceProvider.- Parameters:
ratesServiceProvider
- - a customRatesServiceProvider
- Returns:
- the PricingAdapterConfigurationBuilder
-
setSubscriptionParserFactory
public PricingAdapterConfigurationBuilder setSubscriptionParserFactory(SubscriptionRequestFactory subscriptionParserFactory) Sets a customSubscriptionRequestFactory
to replace the default PricingSubscriptionParserFactory of the standard TrAPI connection.- Parameters:
subscriptionParserFactory
- - a customSubscriptionRequestFactory
- Returns:
- the PricingAdapterConfigurationBuilder
-
setInstrumentProvider
public PricingAdapterConfigurationBuilder setInstrumentProvider(InstrumentProvider instrumentProvider) Sets a customInstrumentProvider
to replace the default InstrumentProvider- Parameters:
instrumentProvider
- a customInstrumentProvider
- Returns:
- this
-
addSubjectMapper
Adds a customSubjectMapper
to extend the PricingAdapter's default subscription behaviour. Subject mappers will be be applied in the order they are added.- Parameters:
subjectMapper
-- Returns:
- this
-
setAdapterName
Overrides the default adapter name- Parameters:
adapterName
- the name to override the default adapter name with
-
build
Creates an instance of PricingAdapterConfiguration which can be used to instantiate a PricingAdapter.- Returns:
- a new PricingAdapterConfiguration
-