public class DistributorAdapter extends MessageAdapter implements QDFilter.UpdateListener
DistributorAdapter
adapts distributor side of QD to message API.
The distributor side of an QD is an aggregation of QDDistributor
for all its APIs (the DistributorAdapter
creates its own distributors,
one distributor per API). Thus, the DistributorAdapter
can be used
to represent an outside data provider in the specific QD.
if you are a QD client - use this AdapterModifier and Type | Class and Description |
---|---|
static class |
DistributorAdapter.Factory
The factory for distributor side of an QD.
|
MessageAdapter.AbstractFactory, MessageAdapter.CloseListener, MessageAdapter.ConfigurableFactory
AUTHENTICATION_LOGIN_REQUIRED, closeListener, doNotCloseOnErrors, messageListener, remoteEndpointId, useDescribeProtocol
Constructor and Description |
---|
DistributorAdapter(QDEndpoint endpoint,
QDTicker ticker,
QDStream stream,
QDHistory history,
SubscriptionFilter filter,
QDFilter stripe,
QDStats stats,
FieldReplacersCache fieldReplacer) |
DistributorAdapter(QDEndpoint endpoint,
QDTicker ticker,
QDStream stream,
QDHistory history,
SubscriptionFilter filter,
QDStats stats)
Deprecated.
|
DistributorAdapter(QDEndpoint endpoint,
QDTicker ticker,
QDStream stream,
QDHistory history,
SubscriptionFilter filter,
QDStats stats,
FieldReplacersCache fieldReplacer)
Deprecated.
|
DistributorAdapter(QDTicker ticker,
QDStream stream,
QDHistory history,
SubscriptionFilter filter,
QDStats stats)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
closeImpl() |
protected QDDistributor |
createDistributor(QDCollector collector,
QDFilter filter,
QDFilter stripe,
String keyProperties)
This method is used internally by distributor adapter to create agent for the corresponding
collector, filter, stripe, and keyProperties from this adapter's constructor.
|
protected QDDistributor |
createDistributor(QDCollector collector,
SubscriptionFilter filter,
String keyProperties)
Deprecated.
|
void |
filterUpdated(QDFilter filter)
This method is fired at most once is a lifetime of a
dynamic filter when
it updates. |
QDCollector |
getCollector(QDContract contract) |
FieldReplacersCache |
getFieldReplacer()
Field Replacers specification.
|
DataScheme |
getScheme() |
String |
getSymbol(char[] chars,
int offset,
int length)
Returns symbol used for specified characters or
null if not found. |
boolean |
isProtocolDescriptorCompatible(ProtocolDescriptor desc) |
void |
prepareProtocolDescriptor(ProtocolDescriptor desc)
Prepares outgoing protocol descriptor.
|
protected void |
processData(DataIterator iterator,
MessageType message) |
void |
processDescribeProtocol(ProtocolDescriptor desc,
boolean logDescriptor)
Process incoming protocol descriptor.
|
boolean |
retrieveMessages(MessageVisitor visitor)
Retrieves accumulated message into specified message visitor.
|
protected void |
startImpl(MasterMessageAdapter master) |
void |
subscriptionAvailable(SubscriptionProvider provider) |
protected void |
subscriptionChanged(SubscriptionProvider provider,
MessageType message) |
String |
toString()
Returns description of this
MessageAdapter for management and logging purposes. |
protected boolean |
visitSubscription(MessageVisitor visitor,
SubscriptionProvider provider,
MessageType message) |
addMask, clearMessageMask, close, getCommonScheme, getConnectionVariables, getEndpoint, getMessageMask, getRemoteEndpointId, getRemoteHostAddress, getRemoteOptSet, getStats, getStatus, handleCorruptedMessage, handleCorruptedStream, handleUnknownMessage, hasMessageMask, intersectStripes, isAlive, isClosed, isMarkedForImmediateRestart, markForImmediateRestart, nextRetrieveTime, notifyListener, prepareAuthenticateProtocolDescriptor, processDescribeProtocol, reinitConfiguration, reportIgnoredMessage, retrieveDescribeProtocolMessage, retrieveMask, setAuthRealm, setCloseListener, setConnectionVariables, setLoginHandler, setMessageListener, setRemoteOptSet, start, start, supportsMixedSubscription, useDescribeProtocol
processHeartbeat, processHistoryAddSubscription, processHistoryData, processHistoryRemoveSubscription, processOtherMessage, processOtherMessage, processRecordSource, processStreamAddSubscription, processStreamData, processStreamRemoveSubscription, processSubscription, processTickerAddSubscription, processTickerData, processTickerRemoveSubscription, processTimeProgressReport
public static final int MESSAGE_HEARTBEAT
public static final int MESSAGE_DESCRIBE_PROTOCOL
public static final int MESSAGE_DESCRIBE_RECORDS
public static final int MESSAGE_DESCRIBE_RESERVED
public static final int MESSAGE_PART
public static final int MESSAGE_RAW_DATA
public static final int MESSAGE_TICKER_DATA
public static final int MESSAGE_TICKER_ADD_SUBSCRIPTION
public static final int MESSAGE_TICKER_REMOVE_SUBSCRIPTION
public static final int MESSAGE_STREAM_DATA
public static final int MESSAGE_STREAM_ADD_SUBSCRIPTION
public static final int MESSAGE_STREAM_REMOVE_SUBSCRIPTION
public static final int MESSAGE_HISTORY_DATA
public static final int MESSAGE_HISTORY_ADD_SUBSCRIPTION
public static final int MESSAGE_HISTORY_REMOVE_SUBSCRIPTION
public static final int MESSAGE_RMI_ADVERTISE_SERVICES
public static final int MESSAGE_RMI_DESCRIBE_SUBJECT
public static final int MESSAGE_RMI_DESCRIBE_OPERATION
public static final int MESSAGE_RMI_REQUEST
public static final int MESSAGE_RMI_CANCEL
public static final int MESSAGE_RMI_RESULT
public static final int MESSAGE_RMI_ERROR
public static final int MESSAGE_RMI_RESPONSE
public static final int MAX_SUPPORTED_MESSAGE_TYPE
public static final int MESSAGE_TEXT_FORMAT
public static final int MESSAGE_ZIP_COMPRESSION
public static final int MESSAGE_GZIP_COMPRESSION
public DistributorAdapter(QDEndpoint endpoint, QDTicker ticker, QDStream stream, QDHistory history, SubscriptionFilter filter, QDFilter stripe, QDStats stats, FieldReplacersCache fieldReplacer)
@Deprecated public DistributorAdapter(QDEndpoint endpoint, QDTicker ticker, QDStream stream, QDHistory history, SubscriptionFilter filter, QDStats stats, FieldReplacersCache fieldReplacer)
@Deprecated public DistributorAdapter(QDEndpoint endpoint, QDTicker ticker, QDStream stream, QDHistory history, SubscriptionFilter filter, QDStats stats)
@Deprecated public DistributorAdapter(QDTicker ticker, QDStream stream, QDHistory history, SubscriptionFilter filter, QDStats stats)
public QDCollector getCollector(QDContract contract)
@Deprecated protected QDDistributor createDistributor(QDCollector collector, SubscriptionFilter filter, String keyProperties)
protected QDDistributor createDistributor(QDCollector collector, QDFilter filter, QDFilter stripe, String keyProperties)
public String toString()
MessageAdapter
MessageAdapter
for management and logging purposes.toString
in class MessageAdapter
public DataScheme getScheme()
getScheme
in class MessageAdapter
public String getSymbol(char[] chars, int offset, int length)
MessageConsumerAdapter
null
if not found.getSymbol
in interface SymbolCodec.Resolver
getSymbol
in class MessageConsumerAdapter
public FieldReplacersCache getFieldReplacer()
MessageAdapter
getFieldReplacer
in class MessageAdapter
public void filterUpdated(QDFilter filter)
QDFilter.UpdateListener
dynamic
filter when
it updates. The new value of the filter shall be retrieved with QDFilter.getUpdatedFilter()
method.
This method is never called under synchronization on any filter to avoid deadlocks.filterUpdated
in interface QDFilter.UpdateListener
filter
- The filter that was updated. Use filter.getUpdateFilter()
to get the new instance of
the updated filter.protected void startImpl(MasterMessageAdapter master)
startImpl
in class MessageAdapter
protected void closeImpl()
closeImpl
in class MessageAdapter
protected void processData(DataIterator iterator, MessageType message)
processData
in class MessageConsumerAdapter
public boolean retrieveMessages(MessageVisitor visitor)
MessageProvider
true
if some messages still remains in the provider
or false
if all accumulated messages were retrieved.retrieveMessages
in interface MessageProvider
retrieveMessages
in class MessageAdapter
public void prepareProtocolDescriptor(ProtocolDescriptor desc)
MessageAdapter
super.prepareProtocolDescriptor(desc)
.prepareProtocolDescriptor
in class MessageAdapter
desc
- outgoing protocol descriptorpublic void processDescribeProtocol(ProtocolDescriptor desc, boolean logDescriptor)
MessageAdapter
super.processDescribeProtocol(desc)
.processDescribeProtocol
in interface MessageConsumer
processDescribeProtocol
in class MessageAdapter
desc
- incoming protocol descriptorlogDescriptor
- when protocol description shall be logged.public boolean isProtocolDescriptorCompatible(ProtocolDescriptor desc)
isProtocolDescriptorCompatible
in class MessageAdapter
protected boolean visitSubscription(MessageVisitor visitor, SubscriptionProvider provider, MessageType message)
public void subscriptionAvailable(SubscriptionProvider provider)
protected void subscriptionChanged(SubscriptionProvider provider, MessageType message)
Copyright © 2002–2025 Devexperts LLC. All rights reserved.