Class FXCalendarAdapter
- java.lang.Object
-
- com.caplin.motif.fx.calendar.FXCalendarAdapter
-
public class FXCalendarAdapter extends java.lang.Object
An adapter that will provide calendar information to the frontend via your implementations ofSettlementDateRequestListener
andTenorDateRequestListener
.
-
-
Constructor Summary
Constructors Constructor Description FXCalendarAdapter(com.caplin.datasource.DataSource dataSource)
Constructs an FXCalendarAdapter serviced by the specified DataSource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache()
Clears the cache of subscriptions and cached records.SettlementDateProvider<SettlementDateSubjectInfo>
registerSettlementDateProvider(SettlementDateRequestListener<SettlementDateSubjectInfo> listener)
Used to register a provider of settlement dates that responds to requested subjects of the standard form:<S extends SettlementDateSubjectInfo>
SettlementDateProvider<S>registerSettlementDateProvider(SettlementDateRequestListener<S> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser<S> subjectParser)
Used to register a provider of settlement dates that responds to non-standard subjects.TenorDateProvider<TenorDateSubjectInfo>
registerTenorDateProvider(TenorDateRequestListener<TenorDateSubjectInfo> listener)
Used to register a provider of tenor dates that responds to requested subjects of the standard form:<T extends TenorDateSubjectInfo>
TenorDateProvider<T>registerTenorDateProvider(TenorDateRequestListener<T> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser<T> subjectParser)
Used to register a provider of tenor dates that responds to non-standard subjects.SettlementDateProvider<ToboSettlementDateSubjectInfo>
registerToboSettlementDateProvider(CancellableSettlementDateRequestListener<ToboSettlementDateSubjectInfo> listener)
Used to register a provider of TOBO users specific settlement dates that responds to requested subjects of the standard form:<S extends ToboSettlementDateSubjectInfo>
SettlementDateProvider<S>registerToboSettlementDateProvider(CancellableSettlementDateRequestListener<S> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser subjectParser)
Used to register a provider of TOBO users specific settlement dates that responds to non-standard subjects.TenorDateProvider<ToboTenorDateSubjectInfo>
registerToboTenorDateProvider(CancellableTenorDateRequestListener<ToboTenorDateSubjectInfo> listener)
Used to register a provider of TOBO user tenor dates that responds to requested subjects of the standard form:<T extends ToboTenorDateSubjectInfo>
TenorDateProvider<T>registerToboTenorDateProvider(CancellableTenorDateRequestListener<T> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser subjectParser)
Used to register a provider of TOBO user tenor dates that responds to non-standard subjects.SettlementDateProvider<UserSettlementDateSubjectInfo>
registerUserSettlementDateProvider(CancellableSettlementDateRequestListener<UserSettlementDateSubjectInfo> listener)
Used to register a provider of user specific settlement dates that responds to requested subjects of the standard form:<S extends UserSettlementDateSubjectInfo>
SettlementDateProvider<S>registerUserSettlementDateProvider(CancellableSettlementDateRequestListener<S> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser subjectParser)
Used to register a provider of user specific settlement dates that responds to non-standard subjects.TenorDateProvider<UserTenorDateSubjectInfo>
registerUserTenorDateProvider(CancellableTenorDateRequestListener<UserTenorDateSubjectInfo> listener)
Used to register a provider of user specific tenor dates that responds to requested subjects of the standard form:<T extends UserTenorDateSubjectInfo>
TenorDateProvider<T>registerUserTenorDateProvider(CancellableTenorDateRequestListener<T> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser subjectParser)
Used to register a provider of user specific tenor dates that responds to non-standard subjects.
-
-
-
Constructor Detail
-
FXCalendarAdapter
public FXCalendarAdapter(com.caplin.datasource.DataSource dataSource)
Constructs an FXCalendarAdapter serviced by the specified DataSource. To register tenor and settlement date providers the following methods should be called:registerSettlementDateProvider(SettlementDateRequestListener)
registerTenorDateProvider(TenorDateRequestListener)
Or, if you want to register tenor date and settlement date providers that respond to subjects that are not the standard FX Motif subjects, the following methods can be called:
- Parameters:
dataSource
- The DataSource which provides connectivity to Liberator.
-
-
Method Detail
-
registerSettlementDateProvider
public SettlementDateProvider<SettlementDateSubjectInfo> registerSettlementDateProvider(SettlementDateRequestListener<SettlementDateSubjectInfo> listener)
Used to register a provider of settlement dates that responds to requested subjects of the standard form:
/CALENDAR/SETTLEMENTDATE/<Currency Pair>/<Year>/<Month>
- Parameters:
listener
- The listener that will handle settlement date requests.
-
registerToboSettlementDateProvider
public SettlementDateProvider<ToboSettlementDateSubjectInfo> registerToboSettlementDateProvider(CancellableSettlementDateRequestListener<ToboSettlementDateSubjectInfo> listener)
Used to register a provider of TOBO users specific settlement dates that responds to requested subjects of the standard form:
/CALENDAR/%u/SETTLEMENTDATE/<Currency Pair>/<Year>/<Month>/TOBOUSER/<Tobo Username>
- Parameters:
listener
- The listener that will handle settlement date requests.
-
registerToboSettlementDateProvider
public <S extends ToboSettlementDateSubjectInfo> SettlementDateProvider<S> registerToboSettlementDateProvider(CancellableSettlementDateRequestListener<S> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser subjectParser)
Used to register a provider of TOBO users specific settlement dates that responds to non-standard subjects.Unless you have modified your front end application to request a different form of subject to the standard FX Motif (perhaps because you want to include extra information on the request) you can call
registerUserSettlementDateProvider(CancellableSettlementDateRequestListener)
instead of this method.- Parameters:
listener
- The listener that will handle settlement date requests.namespace
- A namespace that matches the format of your custom subjects.subjectParser
- A parser that will turn the requested subject into your own custom subclass ofToboSettlementDateSubjectInfo
.
-
registerUserSettlementDateProvider
public SettlementDateProvider<UserSettlementDateSubjectInfo> registerUserSettlementDateProvider(CancellableSettlementDateRequestListener<UserSettlementDateSubjectInfo> listener)
Used to register a provider of user specific settlement dates that responds to requested subjects of the standard form:
/CALENDAR/%u/SETTLEMENTDATE/<Currency Pair>/<Year>/<Month>
- Parameters:
listener
- The listener that will handle settlement date requests.
-
registerUserSettlementDateProvider
public <S extends UserSettlementDateSubjectInfo> SettlementDateProvider<S> registerUserSettlementDateProvider(CancellableSettlementDateRequestListener<S> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser subjectParser)
Used to register a provider of user specific settlement dates that responds to non-standard subjects.Unless you have modified your front end application to request a different form of subject to the standard FX Motif (perhaps because you want to include extra information on the request) you can call
registerToboSettlementDateProvider(CancellableSettlementDateRequestListener)
instead of this method.- Parameters:
listener
- The listener that will handle settlement date requests.namespace
- A namespace that matches the format of your custom subjects.subjectParser
- A parser that will turn the requested subject into your own custom subclass ofToboSettlementDateSubjectInfo
.
-
registerSettlementDateProvider
public <S extends SettlementDateSubjectInfo> SettlementDateProvider<S> registerSettlementDateProvider(SettlementDateRequestListener<S> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser<S> subjectParser)
Used to register a provider of settlement dates that responds to non-standard subjects.Unless you have modified your front end application to request a different form of subject to the standard FX Motif (perhaps because you want to include extra information on the request) you can call
registerSettlementDateProvider(SettlementDateRequestListener)
instead of this method.- Parameters:
listener
- The listener that will handle settlement date requests.namespace
- A namespace that matches the format of your custom subjects.subjectParser
- A parser that will turn the requested subject into your own custom subclass ofSettlementDateSubjectInfo
.
-
registerUserTenorDateProvider
public TenorDateProvider<UserTenorDateSubjectInfo> registerUserTenorDateProvider(CancellableTenorDateRequestListener<UserTenorDateSubjectInfo> listener)
Used to register a provider of user specific tenor dates that responds to requested subjects of the standard form:
/CALENDAR/%u/TENORDATES/<Currency Pair\>
- Parameters:
listener
- The listener that will handle tenor date requests.
-
registerUserTenorDateProvider
public <T extends UserTenorDateSubjectInfo> TenorDateProvider<T> registerUserTenorDateProvider(CancellableTenorDateRequestListener<T> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser subjectParser)
Used to register a provider of user specific tenor dates that responds to non-standard subjects.
Unless you have modified your front end application to request a different form of subject to the standard FX Motif (perhaps because you want to include extra information on the request) you can call
registerUserTenorDateProvider(CancellableTenorDateRequestListener)
instead of this method.- Parameters:
listener
- The listener that will handle tenor date requests.namespace
- A namespace that matches the format of your custom subjects.subjectParser
- A parser that will turn the requested subject into your own custom subclass ofUserTenorDateSubjectInfo
.
-
registerToboTenorDateProvider
public TenorDateProvider<ToboTenorDateSubjectInfo> registerToboTenorDateProvider(CancellableTenorDateRequestListener<ToboTenorDateSubjectInfo> listener)
Used to register a provider of TOBO user tenor dates that responds to requested subjects of the standard form:
/CALENDAR/%u/TENORDATES/<Currency Pair\>/TOBOUSER/<TOBO Username\>
- Parameters:
listener
- The listener that will handle tenor date requests.
-
registerToboTenorDateProvider
public <T extends ToboTenorDateSubjectInfo> TenorDateProvider<T> registerToboTenorDateProvider(CancellableTenorDateRequestListener<T> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser subjectParser)
Used to register a provider of TOBO user tenor dates that responds to non-standard subjects.
Unless you have modified your front end application to request a different form of subject to the standard FX Motif (perhaps because you want to include extra information on the request) you can call
registerToboTenorDateProvider(CancellableTenorDateRequestListener)
instead of this method.- Parameters:
listener
- The listener that will handle tenor date requests.namespace
- A namespace that matches the format of your custom subjects.subjectParser
- A parser that will turn the requested subject into your own custom subclass ofToboTenorDateSubjectInfo
.
-
registerTenorDateProvider
public TenorDateProvider<TenorDateSubjectInfo> registerTenorDateProvider(TenorDateRequestListener<TenorDateSubjectInfo> listener)
Used to register a provider of tenor dates that responds to requested subjects of the standard form:
/CALENDAR/TENORDATES/<Currency Pair\>
- Parameters:
listener
- The listener that will handle tenor date requests.
-
registerTenorDateProvider
public <T extends TenorDateSubjectInfo> TenorDateProvider<T> registerTenorDateProvider(TenorDateRequestListener<T> listener, com.caplin.datasource.namespace.Namespace namespace, SubjectParser<T> subjectParser)
Used to register a provider of tenor dates that responds to non-standard subjects.
Unless you have modified your front end application to request a different form of subject to the standard FX Motif (perhaps because you want to include extra information on the request) you can call
registerTenorDateProvider(TenorDateRequestListener)
instead of this method.- Parameters:
listener
- The listener that will handle tenor date requests.namespace
- A namespace that matches the format of your custom subjects.subjectParser
- A parser that will turn the requested subject into your own custom subclass ofTenorDateSubjectInfo
.
-
clearCache
public void clearCache()
Clears the cache of subscriptions and cached records.
-
-