Class TopicClientChannel

  • All Implemented Interfaces:
    DXChannel<deltix.qsrv.hf.pub.InstrumentMessage>, DirectChannel, deltix.util.security.AuthorizationController.ProtectedResource

    @ParametersAreNonnullByDefault
    public class TopicClientChannel
    extends java.lang.Object
    implements DirectChannel
    Adapter of topics to DirectChannel interface.
    • Constructor Summary

      Constructors 
      Constructor Description
      TopicClientChannel​(TopicDB client, java.lang.String topicKey)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage> createConsumer​(ChannelPreferences options)
      Opens a source for reading data from this channel, according to the specified preferences.
      MessagePoller createPollingConsumer​(ChannelPreferences options)
      Creates a non-blocking poll-style message consumer.
      deltix.data.stream.MessageChannel<deltix.qsrv.hf.pub.InstrumentMessage> createPublisher​(ChannelPreferences options)
      Creates a channel for loading data.
      java.lang.String getDescription()
      Returns a user-readable multi-line description.
      java.lang.String getKey()
      Returns the key, which uniquely identifies the channel
      java.lang.String getName()
      Returns a user-readable short name.
      RecordClassDescriptor[] getTypes()
      Returns the class descriptors associated with this channel
      • Methods inherited from class java.lang.Object

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

      • TopicClientChannel

        public TopicClientChannel​(TopicDB client,
                                  java.lang.String topicKey)
    • Method Detail

      • getKey

        @Nonnull
        public java.lang.String getKey()
        Description copied from interface: DXChannel
        Returns the key, which uniquely identifies the channel
        Specified by:
        getKey in interface DXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
      • getName

        public java.lang.String getName()
        Description copied from interface: DXChannel
        Returns a user-readable short name.
        Specified by:
        getName in interface DXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: DXChannel
        Returns a user-readable multi-line description.
        Specified by:
        getDescription in interface DXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
      • getTypes

        @Nonnull
        public RecordClassDescriptor[] getTypes()
        Description copied from interface: DXChannel
        Returns the class descriptors associated with this channel
        Specified by:
        getTypes in interface DXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
      • createConsumer

        public deltix.data.stream.MessageSource<deltix.qsrv.hf.pub.InstrumentMessage> createConsumer​(ChannelPreferences options)
        Description copied from interface: DXChannel

        Opens a source for reading data from this channel, according to the specified preferences. Iterator-like approach to consume messages: while (source.next()) source.getMessage()

        Specified by:
        createConsumer in interface DXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
        Returns:
        A message source to read messages from.
      • createPublisher

        public deltix.data.stream.MessageChannel<deltix.qsrv.hf.pub.InstrumentMessage> createPublisher​(ChannelPreferences options)
        Description copied from interface: DXChannel
        Creates a channel for loading data. The publisher must be closed when the loading process is finished.
        Specified by:
        createPublisher in interface DXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
        Returns:
        A consumer of messages to be loaded into the channel.