Class PricingAdapterConfigurationBuilder
- java.lang.Object
-
- com.caplin.motif.fx.ret.pricing.config.PricingAdapterConfigurationBuilder
-
public class PricingAdapterConfigurationBuilder extends java.lang.Object
This class produces a PricingAdapterConfiguration which can be used to instantiate an PricingAdapter.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ADAPTER_NAME
-
Constructor Summary
Constructors Constructor Description PricingAdapterConfigurationBuilder()
This class produces a PricingAdapterConfiguration which can be used to instantiate aPricingAdapter
.PricingAdapterConfigurationBuilder(ConfigurationLoader configurationLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PricingAdapterConfigurationBuilder
addSubjectMapper(SubjectMapper subjectMapper)
Adds a customSubjectMapper
to extend the PricingAdapter's default subscription behaviour.PricingAdapterConfiguration
build()
Creates an instance of PricingAdapterConfiguration which can be used to instantiate a PricingAdapter.PricingAdapterConfigurationBuilder
setAdapterConfigurationListener(AdapterConfigurationListener listener)
Sets a customAdapterConfigurationListener
to extend the PricingAdapter's default behaviour.PricingAdapterConfigurationBuilder
setAdapterName(java.lang.String adapterName)
Overrides the default adapter namePricingAdapterConfigurationBuilder
setConfigurationLoader(ConfigurationLoader configurationLoader)
Sets a customConfigurationLoader
to replace the PricingAdapter's default behaviour.PricingAdapterConfigurationBuilder
setDataSource(com.caplin.datasource.DataSource dataSource)
Sets a customDataSource
to extend the PricingAdapter's default behaviour.PricingAdapterConfigurationBuilder
setInstrumentProvider(InstrumentProvider instrumentProvider)
Sets a customInstrumentProvider
to replace the default InstrumentProviderPricingAdapterConfigurationBuilder
setRatesServiceProvider(RatesServiceProvider ratesServiceProvider)
Sets a customRatesServiceProvider
to replace the default RatesServiceProvider.PricingAdapterConfigurationBuilder
setSubscriptionParserFactory(SubscriptionRequestFactory subscriptionParserFactory)
Sets a customSubscriptionRequestFactory
to replace the default PricingSubscriptionParserFactory of the standard TrAPI connection.PricingAdapterConfigurationBuilder
setUserManager(UserManager userManager)
Sets a customUserManager
to extend the PricingAdapter's default behaviour.
-
-
-
Field Detail
-
ADAPTER_NAME
public static final java.lang.String ADAPTER_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PricingAdapterConfigurationBuilder
public PricingAdapterConfigurationBuilder() throws ConfigurationLoaderException
This class produces a PricingAdapterConfiguration which can be used to instantiate aPricingAdapter
.- Throws:
ConfigurationLoaderException
-
PricingAdapterConfigurationBuilder
public PricingAdapterConfigurationBuilder(ConfigurationLoader configurationLoader) throws ConfigurationLoaderException
- Throws:
ConfigurationLoaderException
-
-
Method Detail
-
setUserManager
public PricingAdapterConfigurationBuilder setUserManager(UserManager userManager)
Sets a customUserManager
to extend the PricingAdapter's default behaviour.- Parameters:
userManager
- a customUserManager
- Returns:
- the PricingAdapterConfigurationBuilder
- See Also:
UserManager
-
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:
AdapterConfigurationListener
-
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:
ConfigurationLoader
-
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
public PricingAdapterConfigurationBuilder addSubjectMapper(SubjectMapper subjectMapper)
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
public PricingAdapterConfigurationBuilder setAdapterName(java.lang.String adapterName)
Overrides the default adapter name- Parameters:
adapterName
- the name to override the default adapter name with
-
build
public PricingAdapterConfiguration build()
Creates an instance of PricingAdapterConfiguration which can be used to instantiate a PricingAdapter.- Returns:
- a new PricingAdapterConfiguration
-
-