public interface FXCachedBlotterPublisher
Instances of this class are created using FXBlotterAdapter.createCachedBlotterPublisher(com.caplin.motif.fx.blotter.FXBlotter, com.caplin.motif.fx.blotter.FXBlotterProvider)
.
or FXBlotterAdapter.createCachedBlotterPublisher(com.caplin.motif.fx.blotter.FXBlotter, com.caplin.motif.fx.blotter.FXBlotterProvider, com.caplin.motif.trading.UserSessionObservable)
This publisher is not used in conjunction with a separate Item publisher. Instead,
when a blotter is requested - the blotter, its item subjects, and the data for those items
are all provided in FXCachedBlotterMessage
The API will automatically service the Record Item subject request, so you should not
need to invoke FXBlotterAdapter.createBlotterItemPublisher(com.caplin.motif.fx.blotter.FXBlotter, FXBlotterItemProvider)
with an FXBlotterItemProvider
If an instance of this class is created, it is recommend a cache miss provider be registered
via registerCacheMissProvider(FXBlotterItemProvider)
Modifier and Type | Method and Description |
---|---|
FXCachedBlotterMessageFactory |
getMessageFactory()
Returns the
FXCachedBlotterMessageFactory . |
void |
publish(FXCachedBlotterMessage blotterMessage)
Sends the Blotter Container Message, and caches the Items added to the
FXCachedBlotterMessage . |
void |
publishItem(FXBlotterItemMessage itemMessage)
Sends an update for a Blotter Record Item.
|
void |
publishItemNotFound(FXBlotterItemSubjectInfo info)
Sends a NOT FOUND for a Record Item request.
|
void |
registerCacheMissProvider(FXBlotterItemProvider provider)
Registers a provider that will be notified of any item requests or discards
that are not present in the Cache.
|
void registerCacheMissProvider(FXBlotterItemProvider provider)
FXBlotterItemProvider.onItemRequest(FXBlotterItemSubjectInfo)
is invoked.provider
- The provider to notify when a cache miss occurs.void publish(FXCachedBlotterMessage blotterMessage)
FXCachedBlotterMessage
.
The API will handle the item requests for you using the cached items. If an item should change
state or be updated, us publishItem(FXBlotterItemMessage)
blotterMessage
- void publishItem(FXBlotterItemMessage itemMessage)
itemMessage
- The Record Item that we want to update.void publishItemNotFound(FXBlotterItemSubjectInfo info)
info
- The object representing the request for the Blotter Record Item and its parameters.FXCachedBlotterMessageFactory getMessageFactory()
FXCachedBlotterMessageFactory
. This should be used to create the
FXCachedBlotterMessage
.FXCachedBlotterMessage
.Copyright © 2015 Caplin Systems.