Package deltix.qsrv.hf.tickdb.impl.topic
Class TopicClientChannel
- java.lang.Object
-
- deltix.qsrv.hf.tickdb.impl.topic.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 toDirectChannel
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 channeljava.lang.String
getName()
Returns a user-readable short name.RecordClassDescriptor[]
getTypes()
Returns the class descriptors associated with this channel
-
-
-
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
-
getName
public java.lang.String getName()
Description copied from interface:DXChannel
Returns a user-readable short name.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:DXChannel
Returns a user-readable multi-line description.- Specified by:
getDescription
in interfaceDXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
-
getTypes
@Nonnull public RecordClassDescriptor[] getTypes()
Description copied from interface:DXChannel
Returns the class descriptors associated with this channel
-
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 interfaceDXChannel<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 interfaceDXChannel<deltix.qsrv.hf.pub.InstrumentMessage>
- Returns:
- A consumer of messages to be loaded into the channel.
-
createPollingConsumer
public MessagePoller createPollingConsumer(ChannelPreferences options) throws UnknownChannelException
Description copied from interface:DirectChannel
Creates a non-blocking poll-style message consumer.- Specified by:
createPollingConsumer
in interfaceDirectChannel
- Parameters:
options
- consumer preferences- Returns:
- returns
MessagePoller
that can be used to poll messages from subscription. - Throws:
UnknownChannelException
-
-