public class FXCachedBlotterPublisherImpl extends Object implements FXCachedBlotterPublisher
Constructor and Description |
---|
FXCachedBlotterPublisherImpl(FXBlotterPublisher blotterPublisher,
com.caplin.motif.fx.blotter.FXCachedBlotterItemProviderImpl itemProvider,
FXCachedBlotterMessageFactory factory,
BlotterCache cache,
Executor executor) |
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.
|
public FXCachedBlotterPublisherImpl(FXBlotterPublisher blotterPublisher, com.caplin.motif.fx.blotter.FXCachedBlotterItemProviderImpl itemProvider, FXCachedBlotterMessageFactory factory, BlotterCache cache, Executor executor)
public void registerCacheMissProvider(FXBlotterItemProvider provider)
FXCachedBlotterPublisher
FXBlotterItemProvider.onItemRequest(FXBlotterItemSubjectInfo)
is invoked.registerCacheMissProvider
in interface FXCachedBlotterPublisher
provider
- The provider to notify when a cache miss occurs.public FXCachedBlotterMessageFactory getMessageFactory()
FXCachedBlotterPublisher
FXCachedBlotterMessageFactory
. This should be used to create the
FXCachedBlotterMessage
.getMessageFactory
in interface FXCachedBlotterPublisher
FXCachedBlotterMessage
.public void publish(FXCachedBlotterMessage blotterMessage)
FXCachedBlotterPublisher
FXCachedBlotterMessage
.
The API will handle the item requests for you using the cached items. If an item should change
state or be updated, us FXCachedBlotterPublisher.publishItem(FXBlotterItemMessage)
publish
in interface FXCachedBlotterPublisher
public void publishItem(FXBlotterItemMessage itemMessage)
FXCachedBlotterPublisher
publishItem
in interface FXCachedBlotterPublisher
itemMessage
- The Record Item that we want to update.public void publishItemNotFound(FXBlotterItemSubjectInfo info)
FXCachedBlotterPublisher
publishItemNotFound
in interface FXCachedBlotterPublisher
info
- The object representing the request for the Blotter Record Item and its parameters.Copyright © 2015 Caplin Systems.