public class MessageConsumerAdapter extends Object implements MessageConsumer, SymbolCodec.Resolver
Logging.error(java.lang.String)
and
all functional methods skip incoming data and call handleUnknownMessage(int)
.Constructor and Description |
---|
MessageConsumerAdapter() |
Modifier and Type | Method and Description |
---|---|
String |
getSymbol(char[] chars,
int offset,
int length)
Returns symbol used for specified characters or
null if not found. |
void |
handleCorruptedMessage(int messageTypeId) |
void |
handleCorruptedStream() |
void |
handleUnknownMessage(int messageTypeId) |
protected void |
processData(DataIterator iterator,
MessageType message) |
void |
processDescribeProtocol(ProtocolDescriptor desc,
boolean logDescriptor)
Processes incoming protocol descriptor and returns
true if this message
consumer understands the protocol that remote peer intends to use. |
void |
processHeartbeat(HeartbeatPayload heartbeatPayload) |
void |
processHistoryAddSubscription(SubscriptionIterator iterator)
This implementation calls
processSubscription(iterator, MessageType.HISTORY_ADD_SUBSCRIPTION) . |
void |
processHistoryData(DataIterator iterator)
This implementation calls
processData(iterator, MessageType.HISTORY_DATA) . |
void |
processHistoryRemoveSubscription(SubscriptionIterator iterator)
This implementation calls
processSubscription(iterator, MessageType.HISTORY_REMOVE_SUBSCRIPTION) . |
void |
processOtherMessage(int messageTypeId,
com.devexperts.io.BufferedInput data,
int len) |
void |
processOtherMessage(int messageTypeId,
byte[] bytes,
int ofs,
int len)
This implementation calls
handleUnknownMessage(message_type) . |
void |
processRecordSource(RecordSource source,
MessageType message)
This method calls either
processData(DataIterator, MessageType) or
processSubscription(SubscriptionIterator, MessageType) depending on message. |
void |
processStreamAddSubscription(SubscriptionIterator iterator)
This implementation calls
processSubscription(iterator, MessageType.STREAM_ADD_SUBSCRIPTION) . |
void |
processStreamData(DataIterator iterator)
This implementation calls
processData(iterator, MessageType.STREAM_DATA) . |
void |
processStreamRemoveSubscription(SubscriptionIterator iterator)
This implementation calls
processSubscription(iterator, MessageType.STREAM_REMOVE_SUBSCRIPTION) . |
protected void |
processSubscription(SubscriptionIterator iterator,
MessageType message) |
void |
processTickerAddSubscription(SubscriptionIterator iterator)
This implementation calls
processSubscription(iterator, MessageType.TICKER_ADD_SUBSCRIPTION) . |
void |
processTickerData(DataIterator iterator)
This implementation calls
processData(iterator, MessageType.TICKER_DATA) . |
void |
processTickerRemoveSubscription(SubscriptionIterator iterator)
This implementation calls
processSubscription(iterator, MessageType.TICKER_REMOVE_SUBSCRIPTION) . |
void |
processTimeProgressReport(long timeMillis) |
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 String getSymbol(char[] chars, int offset, int length)
null
if not found.getSymbol
in interface SymbolCodec.Resolver
public void handleCorruptedStream()
handleCorruptedStream
in interface MessageConsumer
public void handleCorruptedMessage(int messageTypeId)
handleCorruptedMessage
in interface MessageConsumer
public void handleUnknownMessage(int messageTypeId)
handleUnknownMessage
in interface MessageConsumer
public void processDescribeProtocol(ProtocolDescriptor desc, boolean logDescriptor)
MessageConsumer
true
if this message
consumer understands the protocol that remote peer intends to use.processDescribeProtocol
in interface MessageConsumer
public void processHeartbeat(HeartbeatPayload heartbeatPayload)
processHeartbeat
in interface MessageConsumer
public void processTimeProgressReport(long timeMillis)
public final void processRecordSource(RecordSource source, MessageType message)
processData(DataIterator, MessageType)
or
processSubscription(SubscriptionIterator, MessageType)
depending on message.
When message is MessageType.RAW_DATA
and this class does not implement
RawDataConsumer
, then processData(DataIterator, MessageType)
for ticket, stream, and history message types is invoked.protected void processData(DataIterator iterator, MessageType message)
protected void processSubscription(SubscriptionIterator iterator, MessageType message)
public void processTickerData(DataIterator iterator)
processData(iterator, MessageType.TICKER_DATA)
.processTickerData
in interface MessageConsumer
public void processTickerAddSubscription(SubscriptionIterator iterator)
processSubscription(iterator, MessageType.TICKER_ADD_SUBSCRIPTION)
.processTickerAddSubscription
in interface MessageConsumer
public void processTickerRemoveSubscription(SubscriptionIterator iterator)
processSubscription(iterator, MessageType.TICKER_REMOVE_SUBSCRIPTION)
.processTickerRemoveSubscription
in interface MessageConsumer
public void processStreamData(DataIterator iterator)
processData(iterator, MessageType.STREAM_DATA)
.processStreamData
in interface MessageConsumer
public void processStreamAddSubscription(SubscriptionIterator iterator)
processSubscription(iterator, MessageType.STREAM_ADD_SUBSCRIPTION)
.processStreamAddSubscription
in interface MessageConsumer
public void processStreamRemoveSubscription(SubscriptionIterator iterator)
processSubscription(iterator, MessageType.STREAM_REMOVE_SUBSCRIPTION)
.processStreamRemoveSubscription
in interface MessageConsumer
public void processHistoryData(DataIterator iterator)
processData(iterator, MessageType.HISTORY_DATA)
.processHistoryData
in interface MessageConsumer
public void processHistoryAddSubscription(SubscriptionIterator iterator)
processSubscription(iterator, MessageType.HISTORY_ADD_SUBSCRIPTION)
.processHistoryAddSubscription
in interface MessageConsumer
public void processHistoryRemoveSubscription(SubscriptionIterator iterator)
processSubscription(iterator, MessageType.HISTORY_REMOVE_SUBSCRIPTION)
.processHistoryRemoveSubscription
in interface MessageConsumer
public final void processOtherMessage(int messageTypeId, byte[] bytes, int ofs, int len)
handleUnknownMessage(message_type)
.processOtherMessage
in interface MessageConsumer
public void processOtherMessage(int messageTypeId, com.devexperts.io.BufferedInput data, int len)
Copyright © 2002–2025 Devexperts LLC. All rights reserved.