public interface BlotterChannel
BlotterChannel is the entry point for sending out BlotterItem
s.
It enters your application through the
BlotterApplicationListener.blotterChannelOpened(com.caplin.datasource.blotter.BlotterChannel)
method
and includes methods such as sendBlotterItem(com.caplin.datasource.blotter.BlotterItem)
for populating the
BlotterChannel
with items.
Modifier and Type | Method and Description |
---|---|
void |
closeChannel()
Closes the channel.
|
java.lang.String |
getParameters()
Returns the parameters for the channel
|
java.lang.String |
getSubject()
Returns the subject for the channel.
|
java.lang.String |
getUsername()
Returns the username for the channel
|
void |
removeBlotterItem(java.lang.String uniqueId)
Removes the
BlotterItem from the internal cache and sends a container remove so that this
item is no longer requested when the channel is subscribed to. |
void |
removeBlotterItems(java.util.List<java.lang.String> uniqueIds)
Removes
BlotterItem s from the internal cache and sends a container remove so that these
items are no longer requested when the channel is subscribed to. |
void |
sendBlotterItem(BlotterItem item)
Adds the
BlotterItem to the internal cache and sends a container add so that this
item is requested when the channel is subscribed to. |
void |
sendBlotterItemNotFound(java.lang.String uniqueId)
Sends a not found for a
BlotterItem . |
void |
sendBlotterItems(java.util.List<BlotterItem> items)
Adds
BlotterItem s to the internal cache and sends a container add so that these
items are requested when the channel is subscribed to. |
void |
sendBlotterItemStatusOk(java.lang.String uniqueId)
Send status ok for a
BlotterItem . |
void |
sendBlotterItemStatusStale(java.lang.String uniqueId)
Send status stale for a
BlotterItem . |
void |
sendBlotterStatusOk()
Sends a status ok on the channel.
|
void |
sendBlotterStatusStale()
Sends a status stale on the channel.
|
void |
sendEmptyBlotter()
Sends an empty container on the channel.
|
void |
setBlotterChannelListener(BlotterChannelListener listener)
Sets a
BlotterChannelListener on the channel. |
void closeChannel()
Closes the channel.
Sends a Subject Not Found on the channel's subject to let subscribers know that it is no longer serviced.
java.lang.String getSubject()
Returns the subject for the channel.
java.lang.String getUsername()
Returns the username for the channel
java.lang.String getParameters()
Returns the parameters for the channel
void removeBlotterItem(java.lang.String uniqueId)
Removes the BlotterItem
from the internal cache and sends a container remove so that this
item is no longer requested when the channel is subscribed to.
uniqueId
- of the item to removevoid removeBlotterItems(java.util.List<java.lang.String> uniqueIds)
Removes BlotterItem
s from the internal cache and sends a container remove so that these
items are no longer requested when the channel is subscribed to.
uniqueIds
- of the items to removevoid sendBlotterItem(BlotterItem item)
Adds the BlotterItem
to the internal cache and sends a container add so that this
item is requested when the channel is subscribed to.
If an item with the same unique id already exists in the internal cache then that item's fields will be updated with this one. This will then trigger an update for any users currently subscribed to this item.
item
- to sendvoid sendBlotterItemNotFound(java.lang.String uniqueId)
Sends a not found for a BlotterItem
.
Specifically for the case where there is more than one Integration Adapter providing for the same channel subject.
Sent in response to a BlotterChannelListener.onBlotterItemRequest(com.caplin.datasource.blotter.BlotterChannel, java.lang.String)
when the item requested is not serviceable by your application.
uniqueId
- of item that cannot be serviced by your application.void sendBlotterItems(java.util.List<BlotterItem> items)
Adds BlotterItem
s to the internal cache and sends a container add so that these
items are requested when the channel is subscribed to.
If any items with the same unique id already exists in the internal cache then these items fields will be updated with these one. This will then trigger an update for any users currently subscribed to these items.
items
- to sendvoid sendBlotterItemStatusOk(java.lang.String uniqueId)
Send status ok for a BlotterItem
.
Under normal circumstances this method is not used.
uniqueId
- of the message whose status is OKvoid sendBlotterItemStatusStale(java.lang.String uniqueId)
Send status stale for a BlotterItem
.
Under normal circumstances this method is not used.
uniqueId
- of the message whose status is STALEvoid sendBlotterStatusOk()
Sends a status ok on the channel.
Under normal circumstances this method is not used.
void sendBlotterStatusStale()
Sends a status stale on the channel.
Under normal circumstances this method is not used.
void sendEmptyBlotter()
Sends an empty container on the channel.
Invoke when a BlotterApplicationListener.blotterChannelOpened(com.caplin.datasource.blotter.BlotterChannel)
callback is received and there are currently no BlotterItem
s to be added for the channel.
I.e. A BlotterApplicationListener.blotterChannelOpened(com.caplin.datasource.blotter.BlotterChannel)
for a historic trade data
BlotterChannel for a user who has not yet traded would be serviced with this method.
Note: This method is not required if the blotter Configuration option BlotterConfiguration.setAutoSendEmptyContainer()
is turned on, in which case
the API will send out an empty container for a blotter channel that was opened - unless it is materialized paths
void setBlotterChannelListener(BlotterChannelListener listener)
Sets a BlotterChannelListener
on the channel.
Specifically for the case where there is more than one Integration Adapter providing for the same channel subject.
See BlotterConfiguration
for how to configure for this eventuality.
listener
- to receive requests for items not already cached by the BlotterAPIPlease send bug reports and comments to Caplin support