Package com.caplin.motif.fx.rates
Class FXRatesAdapter
java.lang.Object
com.caplin.motif.datasource.CachedAdapter
com.caplin.motif.fx.rates.FXRatesAdapter
An FXRatesAdapter services rate streaming for ESP, SPOT, FORWARD and SWAP rates. The adapter also supports streaming prices for broken dates.
Typically, an FXRatesAdapter will be setup as follows:
FXRatesAdapter adapter = new FXRatesAdapter(dataSource);
-
Field Summary
Fields inherited from class com.caplin.motif.datasource.CachedAdapter
dataSource
-
Constructor Summary
ConstructorDescriptionFXRatesAdapter
(com.caplin.datasource.DataSource dataSource) Constructs an FXRatesAdapter that will utilise the specified DataSource and its configuration for communication with the motif. -
Method Summary
Modifier and TypeMethodDescription<T extends RateSubjectInfo>
FXQuotePublishercreateQuotePublisher
(com.caplin.datasource.namespace.Namespace namespace, CachedDataProvider<T> provider, SubjectParser<T> subjectParser) Creates an FXQuotePublisher that is able to respond to messages received on the CachedDataProvider that is passed in.createQuotePublisher
(String namespace, CachedDataProvider<RateSubjectInfo> provider) Creates an FXQuotePublisher that is able to respond to messages received on the CachedDataProvider that is passed in.<T extends RateSubjectInfo>
FXQuotePublishercreateQuotePublisher
(String namespace, CachedDataProvider<T> provider, SubjectParser<T> subjectParser) Creates an FXQuotePublisher that is able to respond to messages received on the CachedDataProvider that is passed in.Methods inherited from class com.caplin.motif.datasource.CachedAdapter
createCachedPublisher, createCachedPublisher
-
Constructor Details
-
FXRatesAdapter
public FXRatesAdapter(com.caplin.datasource.DataSource dataSource) Constructs an FXRatesAdapter 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, SPOT, FORWARD and SWAP rates. As well as requests for prices on Broken Dates.
-
-
Method Details
-
createQuotePublisher
public FXQuotePublisher createQuotePublisher(String namespace, CachedDataProvider<RateSubjectInfo> provider) Creates an FXQuotePublisher that is able to respond to messages received on the CachedDataProvider that is passed in.- Parameters:
namespace
- the namespace to provide rates for, defaults are defined inRateSubjectNamespacing.DefaultNamespaces
provider
- the CachedDataProvider that will receive the rate requests- Returns:
- the FXQuotePublisher able to send quotes containing rates
-
createQuotePublisher
public <T extends RateSubjectInfo> FXQuotePublisher createQuotePublisher(String namespace, CachedDataProvider<T> provider, SubjectParser<T> subjectParser) Creates an FXQuotePublisher that is able to respond to messages received on the CachedDataProvider that is passed in.- Parameters:
namespace
- the namespace to provide rates for, defaults are defined inRateSubjectNamespacing.DefaultNamespaces
provider
- the CachedDataProvider that will receive the rate requestssubjectParser
- the parser that will parse rate subject requests into an object representation of the request.- Returns:
- the FXQuotePublisher able to send quotes containing rates
-
createQuotePublisher
public <T extends RateSubjectInfo> FXQuotePublisher createQuotePublisher(com.caplin.datasource.namespace.Namespace namespace, CachedDataProvider<T> provider, SubjectParser<T> subjectParser) Creates an FXQuotePublisher that is able to respond to messages received on the CachedDataProvider that is passed in.- Parameters:
namespace
- a custom namespace to provide rates forprovider
- the CachedDataProvider that will receive the rate requestssubjectParser
- the parser that will parse rate subject requests into an object representation of the request.- Returns:
- the FXQuotePublisher able to send quotes containing rates
-