Class TOBOEntityChannel


  • public class TOBOEntityChannel
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.caplin.datasource.blotter.BlotterChannel blotterChannel  
    • Constructor Summary

      Constructors 
      Constructor Description
      TOBOEntityChannel​(com.caplin.datasource.blotter.BlotterChannel blotterChannel)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Clears all BlotterItems from the internal cache and sends a container clear so that these items are no longer requested when the channel is subscribed to.
      void closeChannel()
      Closes the channel.
      java.lang.String getSubject()
      Returns the subject for the channel.
      java.lang.String getUsername()
      Returns the username for the channel
      void removeTOBOEntities​(java.util.List<java.lang.String> toboEntityIds)
      Removes BlotterItems from the internal cache and sends a container remove so that these items are no longer requested when the channel is subscribed to.
      void removeTOBOEntity​(java.lang.String toboEntityId)
      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 sendEmptyTOBOEntityContainer()
      Sends an empty container on the channel.
      void sendTOBOEntity​(com.caplin.datasource.blotter.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 sendTOBOEntityContainerStatusOk​(java.lang.String message)
      Sends a status ok on the channel with custom message.
      void sendTOBOEntityContainerStatusStale()
      Sends a status stale on the channel.
      void sendTOBOEntityContainerStatusStale​(java.lang.String message)
      Sends a status stale on the channel with custom message.
      void sendTOBOEntityMapping​(java.lang.String newSubject)
      Sends a MappingMessage to the Liberator, requesting that the Liberator map this TOBOEntityChannel instance's subject to the specified subject newSubject.
      void sendTOBOEntityNotFound​(java.lang.String uniqueId)
      Sends a not found for a BlotterItem.
      void sendTOBOEntityStatusOk()
      Sends a status ok on the channel.
      void sendTOBOEntityStatusOk​(java.lang.String toboEntityId)
      Send status ok for a BlotterItem.
      void sendTOBOEntityStatusStale​(java.lang.String toboEntityId)
      Send status stale for a BlotterItem.
      void setTOBOEntityItems​(java.util.List<com.caplin.datasource.blotter.BlotterItem> items)
      Adds BlotterItems to the internal cache and sends a container add so that these items are requested when the channel is subscribed to.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • blotterChannel

        protected final com.caplin.datasource.blotter.BlotterChannel blotterChannel
    • Constructor Detail

      • TOBOEntityChannel

        public TOBOEntityChannel​(com.caplin.datasource.blotter.BlotterChannel blotterChannel)
    • Method Detail

      • closeChannel

        public 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.

      • getSubject

        public java.lang.String getSubject()

        Returns the subject for the channel.

        Returns:
        subject for the channel
      • getUsername

        public java.lang.String getUsername()

        Returns the username for the channel

        Returns:
        username for the channel
      • removeTOBOEntity

        public void removeTOBOEntity​(java.lang.String toboEntityId)

        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.

        Parameters:
        toboEntityId - of the tobo entity item to remove
      • removeTOBOEntities

        public void removeTOBOEntities​(java.util.List<java.lang.String> toboEntityIds)

        Removes BlotterItems from the internal cache and sends a container remove so that these items are no longer requested when the channel is subscribed to.

        Parameters:
        toboEntityIds - of the entity items to remove
      • clear

        public void clear()

        Clears all BlotterItems from the internal cache and sends a container clear so that these items are no longer requested when the channel is subscribed to.

      • sendTOBOEntity

        public void sendTOBOEntity​(com.caplin.datasource.blotter.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.

        Parameters:
        item - TOBO entity to send
      • sendTOBOEntityNotFound

        public void sendTOBOEntityNotFound​(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.

        Parameters:
        uniqueId - of item that cannot be serviced by your application.
      • setTOBOEntityItems

        public void setTOBOEntityItems​(java.util.List<com.caplin.datasource.blotter.BlotterItem> items)

        Adds BlotterItems 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.

        Parameters:
        items - to send
      • sendTOBOEntityMapping

        public void sendTOBOEntityMapping​(java.lang.String newSubject)

        Sends a MappingMessage to the Liberator, requesting that the Liberator map this TOBOEntityChannel instance's subject to the specified subject newSubject.

        Note: Liberator applies mapping rules configured by mapping messages after it applies mapping rules configured by object-map config items.

        This method can be used to provide a user with access to a shared group blotter via a general subject, such as /PRIVATE/FX/GROUPBLOTTER. In the TOBOEntityListener.toboEntityChannelOpened(TOBOEntityChannel) method for the general subject, determine which group the user is a member of and call sendTOBOEntityMapping(java.lang.String), passing it the subject of the group's blotter.

        Parameters:
        newSubject - the subject to map this blotter's subject to
      • sendTOBOEntityStatusOk

        public void sendTOBOEntityStatusOk​(java.lang.String toboEntityId)

        Send status ok for a BlotterItem.

        Under normal circumstances this method is not used.

        Parameters:
        toboEntityId - of the message whose status is OK
      • sendTOBOEntityStatusStale

        public void sendTOBOEntityStatusStale​(java.lang.String toboEntityId)

        Send status stale for a BlotterItem.

        Under normal circumstances this method is not used.

        Parameters:
        toboEntityId - of the message whose status is STALE
      • sendTOBOEntityStatusOk

        public void sendTOBOEntityStatusOk()

        Sends a status ok on the channel.

        Under normal circumstances this method is not used.

      • sendTOBOEntityContainerStatusStale

        public void sendTOBOEntityContainerStatusStale​(java.lang.String message)

        Sends a status stale on the channel with custom message.

        Under normal circumstances this method is not used.

      • sendTOBOEntityContainerStatusOk

        public void sendTOBOEntityContainerStatusOk​(java.lang.String message)

        Sends a status ok on the channel with custom message.

        Under normal circumstances this method is not used.

      • sendTOBOEntityContainerStatusStale

        public void sendTOBOEntityContainerStatusStale()

        Sends a status stale on the channel.

        Under normal circumstances this method is not used.

      • sendEmptyTOBOEntityContainer

        public void sendEmptyTOBOEntityContainer()

        Sends an empty container on the channel.

        Invoke when a TOBOEntityListener.toboEntityChannelOpened(TOBOEntityChannel) callback is received and there are currently no BlotterItems to be added for the channel.

        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 TOBO Entity channel that was opened - unless it is materialized paths