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 Adapter| Modifier and Type | Class and Description |
|---|---|
static class |
DistributorAdapter.Factory
The factory for distributor side of a QD.
|
MessageAdapter.AbstractFactory, MessageAdapter.CloseListener, MessageAdapter.ConfigurableFactoryAUTHENTICATION_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.
|
void |
filterUpdated(QDFilter filter)
This method is fired at most once is a lifetime of a
dynamic filter when
it updates. |
com.devexperts.util.TimePeriodInfo |
getAggregationPeriodInfo()
Returns the aggregation period info for this adapter (programmatic API).
|
QDCollector |
getCollector(QDContract contract) |
FieldReplacersCache |
getFieldReplacer()
Field Replacers specification.
|
String |
getRequestedAggregationPeriod()
Returns the client-requested aggregation period string.
|
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.
|
void |
setAggregationPeriodInfo(com.devexperts.util.TimePeriodInfo timePeriodInfo)
Updates the server-applied aggregation period info on this adapter.
|
void |
setRequestedAggregationPeriod(String requestedAggregationPeriod)
Sets the requested aggregation period to send to the server.
|
void |
setRequestedAggregationPeriod(com.devexperts.util.TimePeriod requestedAggregationPeriod)
Sets requested aggregation period (programmatic API, TimePeriod).
|
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, getAggregationPeriodInfoStr, getCommonScheme, getConnectionVariables, getDefaultAggregationPeriod, getEndpoint, getMaxAggregationPeriod, getMessageMask, getMinAggregationPeriod, 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, setDefaultAggregationPeriod, setLoginHandler, setMaxAggregationPeriod, setMessageListener, setMinAggregationPeriod, setRemoteOptSet, start, start, supportsMixedSubscription, useDescribeProtocolprocessHeartbeat, processHistoryAddSubscription, processHistoryData, processHistoryRemoveSubscription, processOtherMessage, processOtherMessage, processRecordSource, processStreamAddSubscription, processStreamData, processStreamRemoveSubscription, processSubscription, processTickerAddSubscription, processTickerData, processTickerRemoveSubscription, processTimeProgressReportpublic 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 String getRequestedAggregationPeriod()
MessageAdapterMBeannull if not set. Applicable for client-side adapters (DistributorAdapter).getRequestedAggregationPeriod in interface MessageAdapterMBeangetRequestedAggregationPeriod in class MessageAdapterpublic void setRequestedAggregationPeriod(String requestedAggregationPeriod)
MessageAdapterMBeansetRequestedAggregationPeriod in interface MessageAdapterMBeansetRequestedAggregationPeriod in class MessageAdapterrequestedAggregationPeriod - aggregation period string (e.g. "1s"), or "undefined"/empty to resetpublic void setRequestedAggregationPeriod(com.devexperts.util.TimePeriod requestedAggregationPeriod)
public void setAggregationPeriodInfo(com.devexperts.util.TimePeriodInfo timePeriodInfo)
MessageAdapterDistributorAdapter overrides with the real assignment, and wrapper adapters
(e.g. RMIMessageAdapter) override to forward to their attached adapter.setAggregationPeriodInfo in class MessageAdapterpublic com.devexperts.util.TimePeriodInfo getAggregationPeriodInfo()
MessageAdapterAgentAdapter: computed from actual channel shaper values.
For DistributorAdapter: received from server.getAggregationPeriodInfo in class MessageAdapterTimePeriodInfo.UNKNOWN if not availablepublic QDCollector getCollector(QDContract contract)
protected QDDistributor createDistributor(QDCollector collector, QDFilter filter, QDFilter stripe, String keyProperties)
public String toString()
MessageAdapterMessageAdapter for management and logging purposes.toString in class MessageAdapterpublic DataScheme getScheme()
getScheme in class MessageAdapterpublic String getSymbol(char[] chars, int offset, int length)
MessageConsumerAdapternull if not found.getSymbol in interface SymbolCodec.ResolvergetSymbol in class MessageConsumerAdapterpublic FieldReplacersCache getFieldReplacer()
MessageAdaptergetFieldReplacer in class MessageAdapterpublic void filterUpdated(QDFilter filter)
QDFilter.UpdateListenerdynamic 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.UpdateListenerfilter - 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 MessageAdapterprotected void closeImpl()
closeImpl in class MessageAdapterprotected void processData(DataIterator iterator, MessageType message)
processData in class MessageConsumerAdapterpublic boolean retrieveMessages(MessageVisitor visitor)
MessageProvidertrue if some messages still remains in the provider
or false if all accumulated messages were retrieved.retrieveMessages in interface MessageProviderretrieveMessages in class MessageAdapterpublic void prepareProtocolDescriptor(ProtocolDescriptor desc)
MessageAdaptersuper.prepareProtocolDescriptor(desc).prepareProtocolDescriptor in class MessageAdapterdesc - outgoing protocol descriptorpublic void processDescribeProtocol(ProtocolDescriptor desc, boolean logDescriptor)
MessageAdaptersuper.processDescribeProtocol(desc).processDescribeProtocol in interface MessageConsumerprocessDescribeProtocol in class MessageAdapterdesc - incoming protocol descriptorlogDescriptor - when protocol description shall be logged.public boolean isProtocolDescriptorCompatible(ProtocolDescriptor desc)
isProtocolDescriptorCompatible in class MessageAdapterprotected boolean visitSubscription(MessageVisitor visitor, SubscriptionProvider provider, MessageType message)
public void subscriptionAvailable(SubscriptionProvider provider)
protected void subscriptionChanged(SubscriptionProvider provider, MessageType message)
Copyright © 2002–2026 Devexperts LLC. All rights reserved.