@Internal public final class ProtocolDescriptor extends Object
DESCRIBE_PROTOCOL message.| Modifier and Type | Field and Description |
|---|---|
static String |
AGGREGATION_PERIOD_INFO_PROPERTY
Per-message property carrying the server's actual aggregation period as a
TimePeriodInfo
JSON string: {"min":1.5,"max":2.0} (seconds with decimals). |
static String |
AUTHENTICATION_PROPERTY
Authentication challenge/response between server and client during login handshake.
|
static String |
AUTHORIZATION_PROPERTY
Authorization token sent from client to server (e.g., "Basic base64..." or "Bearer token").
|
static String |
BASIC_AUTHORIZATION
Scheme identifier for HTTP Basic authentication, used as a prefix
in
AUTHORIZATION_PROPERTY values. |
static String |
FILTER_PROPERTY
Connection filter in
QDFilter syntax. |
static String |
MAGIC_STRING
This string identifies protocol descriptor message.
|
static String |
NAME_PROPERTY
Human-readable endpoint name for logging and diagnostics.
|
static String |
OPT_PROPERTY
Serialization options affecting wire format (e.g., "hs" enables EventFlags storage).
|
static String |
REQUESTED_AGGREGATION_PERIOD_PROPERTY
Client's requested data aggregation period as a
TimePeriod
string (e.g., "1s", "0.5s"). |
static String |
RMI_PROPERTY
RMI endpoint role identifier (e.g., "CLIENT", "SERVER").
|
static String |
SERVICES_PROPERTY
Available RMI services in ServiceFilter syntax.
|
static String |
STRIPE_PROPERTY
Symbol striping filter in
QDFilter syntax (using SymbolStriper). |
static String |
TIME_PROPERTY
Timestamp format for event time embedding (e.g., "millis", "seconds", "nanos").
|
static String |
TYPE_PROPERTY
Protocol/format type identifier (e.g., "qtp" for socket QTP, "tape" for tape files).
|
static String |
VERSION_PROPERTY
Implementation version in free text form.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addReceive(MessageDescriptor message) |
void |
addSend(MessageDescriptor message) |
int |
appendFromTextTokens(List<String> tokens,
int i)
Adds information to this protocol descriptor from a list of strings that are parsed
from tab or comma separated text format.
|
boolean |
canReceive(MessageType message) |
boolean |
canSend(MessageType message) |
void |
composeTo(com.devexperts.io.BufferedOutput out)
Composes this protocol descriptor in compact binary format
including its
MAGIC_STRING. |
List<String> |
convertToTextTokens()
Converts this protocol descriptor to a list of strings for representation in tab or comma separated text format.
|
ProtocolDescriptor |
deltaFrom(ProtocolDescriptor prev)
Returns
current as-is when prev == null (first emission is always
full); otherwise returns a descriptor containing only the top-level properties and
per-message properties whose values differ from prev. |
com.devexperts.connector.proto.EndpointId |
getEndpointId() |
Map<String,String> |
getProperties() |
String |
getProperty(String key) |
MessageDescriptor |
getReceive(MessageType message) |
Set<MessageDescriptor> |
getReceiveMessages() |
EnumSet<MessageType> |
getReceiveSet() |
MessageDescriptor |
getSend(MessageType message) |
Set<MessageDescriptor> |
getSendMessages() |
EnumSet<MessageType> |
getSendSet() |
void |
mergeFrom(ProtocolDescriptor delta)
Merges
delta into this descriptor with the same accumulation semantics as
parseFrom(BufferedInput): top-level properties are putAll-ed; per-message
descriptors with the same id have their properties putAll-ed into the existing one,
while new ids are added as reparented copies; a non-null endpointId overrides. |
static ProtocolDescriptor |
newEmptyProtocolDescriptor()
Creates an empty protocol descriptor with no properties and no message descriptors.
|
MessageDescriptor |
newMessageDescriptor(int id,
String name) |
MessageDescriptor |
newMessageDescriptor(MessageType messageType) |
static ProtocolDescriptor |
newPeerProtocolDescriptor(ProtocolDescriptor previouslyRead) |
static ProtocolDescriptor |
newPeerProtocolDescriptorReadAs(ProtocolDescriptor original,
MessageType readAs) |
static ProtocolDescriptor |
newSelfProtocolDescriptor(String type)
Creates empty protocol description for a specified type with an embedded QDS version.
|
void |
parseFrom(com.devexperts.io.BufferedInput in)
Parses protocol descriptor from compact binary format
including its
MAGIC_STRING. |
void |
setEndpointId(com.devexperts.connector.proto.EndpointId endpointId) |
void |
setProperty(String key,
String value) |
String |
toString() |
public static final String MAGIC_STRING
public static final String TYPE_PROPERTY
public static final String VERSION_PROPERTY
public static final String OPT_PROPERTY
ProtocolOption set. Affects message encoding and decoding.public static final String TIME_PROPERTY
public static final String NAME_PROPERTY
public static final String FILTER_PROPERTY
QDFilter syntax. MAY be used to determine
what data the remote side will ignore, to avoid sending it for performance reasons.public static final String STRIPE_PROPERTY
QDFilter syntax (using SymbolStriper).
Coordinates symbol partitioning across connections for load distribution.public static final String SERVICES_PROPERTY
public static final String AUTHORIZATION_PROPERTY
public static final String AUTHENTICATION_PROPERTY
public static final String RMI_PROPERTY
public static final String BASIC_AUTHORIZATION
AUTHORIZATION_PROPERTY values.public static final String REQUESTED_AGGREGATION_PERIOD_PROPERTY
TimePeriod
string (e.g., "1s", "0.5s"). Set per message type (TICKER_DATA, STREAM_DATA, HISTORY_DATA).
Server clamps to its configured bounds; empty string signals reset to server default.public static final String AGGREGATION_PERIOD_INFO_PROPERTY
TimePeriodInfo
JSON string: {"min":1.5,"max":2.0} (seconds with decimals).public static ProtocolDescriptor newSelfProtocolDescriptor(String type)
type - the type.public static ProtocolDescriptor newPeerProtocolDescriptor(ProtocolDescriptor previouslyRead)
public static ProtocolDescriptor newEmptyProtocolDescriptor()
DESCRIBE_PROTOCOL message in isolation,
so the resulting descriptor reflects exactly the bytes received and can later be merged
into an accumulator via mergeFrom(ProtocolDescriptor).public static ProtocolDescriptor newPeerProtocolDescriptorReadAs(ProtocolDescriptor original, MessageType readAs)
public MessageDescriptor newMessageDescriptor(MessageType messageType)
public MessageDescriptor newMessageDescriptor(int id, String name)
public com.devexperts.connector.proto.EndpointId getEndpointId()
public void setEndpointId(com.devexperts.connector.proto.EndpointId endpointId)
public Set<MessageDescriptor> getSendMessages()
public Set<MessageDescriptor> getReceiveMessages()
public boolean canSend(MessageType message)
public boolean canReceive(MessageType message)
public EnumSet<MessageType> getSendSet()
public MessageDescriptor getSend(MessageType message)
public EnumSet<MessageType> getReceiveSet()
public MessageDescriptor getReceive(MessageType message)
public void addSend(MessageDescriptor message)
public void addReceive(MessageDescriptor message)
public void mergeFrom(ProtocolDescriptor delta)
delta into this descriptor with the same accumulation semantics as
parseFrom(BufferedInput): top-level properties are putAll-ed; per-message
descriptors with the same id have their properties putAll-ed into the existing one,
while new ids are added as reparented copies; a non-null endpointId overrides.public ProtocolDescriptor deltaFrom(ProtocolDescriptor prev)
current as-is when prev == null (first emission is always
full); otherwise returns a descriptor containing only the top-level properties and
per-message properties whose values differ from prev.public void composeTo(com.devexperts.io.BufferedOutput out)
throws IOException
MAGIC_STRING.IOExceptionpublic void parseFrom(com.devexperts.io.BufferedInput in)
throws IOException
MAGIC_STRING.IOException - when descriptor cannot be read due to wrong magic or other reasons.public List<String> convertToTextTokens()
MAGIC_STRING.public int appendFromTextTokens(List<String> tokens, int i)
Copyright © 2002–2026 Devexperts LLC. All rights reserved.