public class FXBlotterAdapter extends Object
An FXBlotterAdapter services the capabilities for the Blotters supported in the Motif.
Each of the Motif Blotters are represented by a static instance to be found in FXBlotter
, this object contains
the regex's required to recognise and parse requests belonging to said Motif Blotters. One of these must be used.
Prefer to use createCachedBlotterPublisher(FXBlotter, FXBlotterProvider)
if you have a blotter that will
be going through Transformer. The cached publisher requires you to provide the data for all record items
when publishing the container. As such you will not need to deal with the request for the record item, the API
will handle this for you.
It is highly recommended that you register a cache miss provider via FXCachedBlotterPublisher.registerCacheMissProvider(FXBlotterItemProvider)
if you decide to create the cached blotter publisher as above.
Otherwise if you will be sorting and filtering yourself without Transformer (for example, you want to handle
sorting and filtering with a database query) then you can create a non-cached publisher. If you do so, you will also
need to implement the FXBlotterItemProvider
and create the FXBlotterItemPublisher
to publish Blotter Items.
Unlike the cached publisher, the non-cached publisher does not handle servicing the blotter item requests for you, and you
must do this yourself by using the FXBlotterItemPublisher
. The following two methods should be invoked to service a
blotter without the non-cached publisher:
createBlotterPublisher(FXBlotter, FXBlotterProvider)
createBlotterItemPublisher(FXBlotter, FXBlotterItemProvider)
Prefer to use these two if you have a blotter that will be going through just Liberator and not Transformer, as you will be dealing with sorting and filtering yourself
Constructor and Description |
---|
FXBlotterAdapter(com.caplin.datasource.DataSource dataSource)
Creates the FXBlotterAdapter that will utilise the specified
DataSource and its configuration for communication with the FX Motif.
|
public FXBlotterAdapter(com.caplin.datasource.DataSource dataSource)
dataSource
- The DataSource instance that will be used to receive requests for blotters from the FX Motif.public FXBlotterPublisher createBlotterPublisher(FXBlotter blotter, FXBlotterProvider<? extends FXBlotterSubjectInfo> provider)
Creates an FXBlotterPublisher
for the blotter provided. Requests for the blotter container will be
received on the given provider. The provider should use the FXBlotterPublisher
created here to respond to requests.
Prefer to use this over createCachedBlotterPublisher(FXBlotter, FXBlotterProvider)
and createCachedBlotterPublisher(FXBlotter, FXBlotterProvider, UserSessionObservable)
if you are servicing a blotter that is configured to go through Liberator, and not Transformer
blotter
- The object containing the container regex that we are interested in.provider
- The provider that will receive the blotter container requests.public FXBlotterPublisher createBlotterPublisher(FXBlotter blotter, FXBlotterProvider<? extends FXBlotterSubjectInfo> provider, SubjectParser<FXBlotterSubjectInfo> blotterSubjectParser)
Creates an FXBlotterPublisher
for the blotter provided. Requests for the blotter container will be
received on the given provider. The provider should use the FXBlotterPublisher
created here to respond to requests.
Prefer to use this over createCachedBlotterPublisher(FXBlotter, FXBlotterProvider)
and createCachedBlotterPublisher(FXBlotter, FXBlotterProvider, UserSessionObservable)
if you are servicing a blotter that is configured to go through Liberator, and not Transformer
blotter
- The object containing the container regex that we are interested in.provider
- The provider that will receive the blotter container requests.blotterSubjectParser
- The subject parser that will be used to parse subjects pertaining to the FXBlotter
object passed inpublic FXBlotterItemPublisher createBlotterItemPublisher(FXBlotter blotter, FXBlotterItemProvider<? extends FXBlotterItemSubjectInfo> provider)
Creates an FXBlotterItemPublisher
for the blotter provided. Requests for the blotter items will be
received on the given provider. The provider should use the FXBlotterItemPublisher
created here, to respond to requests.
You should create this item publisher and provide an FXBlotterItemProvider
if you have created a publisher for the container
using createBlotterPublisher(FXBlotter, FXBlotterProvider)
blotter
- The object containing the record item regex.provider
- The provider that will receive the blotter record item requests.public FXCachedBlotterPublisher createCachedBlotterPublisher(FXBlotter blotter, FXBlotterProvider<? extends FXBlotterSubjectInfo> provider, SubjectParser<FXBlotterSubjectInfo> blotterSubjectParser)
Creates an FXCachedBlotterPublisher
for the blotter provided. Requests for the blotter items will be
received on the given provider. The provider should use the FXCachedBlotterPublisher
to respond to requests
Prefer to use this over createBlotterPublisher(FXBlotter, FXBlotterProvider)
if you are servicing a blotter
configured to go through Transformer
Since you will be creating the cached version of the blotter provider. It is highly recommended that you register a cache miss provider
via FXCachedBlotterPublisher.registerCacheMissProvider(FXBlotterItemProvider)
blotter
- The object containing the Container subject regex, and the Record Item subject regex for that container.provider
- The provider that will receive the blotter container requests.blotterSubjectParser
- The subject parser that will be used to parse subjects pertaining to the FXBlotter
object passed inpublic FXCachedBlotterPublisher createCachedBlotterPublisher(FXBlotter blotter, FXBlotterProvider<? extends FXBlotterSubjectInfo> provider)
Creates an FXCachedBlotterPublisher
for the blotter provided. Requests for the blotter items will be
received on the given provider. The provider should use the FXCachedBlotterPublisher
to respond to requests
Prefer to use this over createBlotterPublisher(FXBlotter, FXBlotterProvider)
if you are servicing a blotter
configured to go through Transformer
Since you will be creating the cached version of the blotter provider. It is highly recommended that you register a cache miss provider
via FXCachedBlotterPublisher.registerCacheMissProvider(FXBlotterItemProvider)
blotter
- The object containing the Container subject regex, and the Record Item subject regex for that container.provider
- The provider that will receive the blotter container requests.public FXCachedBlotterPublisher createCachedBlotterPublisher(FXBlotter blotter, FXBlotterProvider<? extends FXBlotterSubjectInfo> provider, UserSessionObservable userSessionObservable)
Creates an FXCachedBlotterPublisher
for the blotter provided. Requests for the blotter items will be
received on the given provider. The provider should use the FXCachedBlotterPublisher
to respond to requests
Prefer to use this over createBlotterPublisher(FXBlotter, FXBlotterProvider)
if you are servicing a blotter
configured to go through Transformer
Since you will be creating the cached version of the blotter provider. It is highly recommended that you register a cache miss provider
via FXCachedBlotterPublisher.registerCacheMissProvider(FXBlotterItemProvider)
blotter
- The object containing the Container subject regex, and the Record Item subject regex for that container.provider
- The provider that will receive the blotter container requests.userSessionObservable
- Called when a new user sessions listener is added or removed.public FXCachedBlotterPublisher createCachedBlotterPublisher(FXBlotter blotter, FXBlotterProvider<? extends FXBlotterSubjectInfo> provider, UserSessionObservable userSessionObservable, SubjectParser<FXBlotterSubjectInfo> blotterSubjectParser)
Creates an FXCachedBlotterPublisher
for the blotter provided. Requests for the blotter items will be
received on the given provider. The provider should use the FXCachedBlotterPublisher
to respond to requests
Prefer to use this over createBlotterPublisher(FXBlotter, FXBlotterProvider)
if you are servicing a blotter
configured to go through Transformer
Since you will be creating the cached version of the blotter provider. It is highly recommended that you register a cache miss provider
via FXCachedBlotterPublisher.registerCacheMissProvider(FXBlotterItemProvider)
blotter
- The object containing the Container subject regex, and the Record Item subject regex for that container.provider
- The provider that will receive the blotter container requests.userSessionObservable
- Called when a new user sessions listener is added or removed.blotterSubjectParser
- The subject parser that will be used to parse subjects pertaining to the FXBlotter
object passed inCopyright © 2015 Caplin Systems.