public class BinaryQTPComposer extends AbstractQTPComposer
AbstractQTPComposer.setOutput(BufferedOutput) method
immediately after construction.AbstractQTPComposer,
BinaryQTPParsercurrentMessageType, msg, optSet, scheme, stats, writeEventTimeSequence, writeHeartbeatVOID| Constructor and Description |
|---|
BinaryQTPComposer(DataScheme scheme,
boolean describeRecords)
Constructs binary composer.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
describeRecord(DataRecord record) |
protected void |
finishComposingMessage(com.devexperts.io.BufferedOutput out)
Performs actions necessary to finish composing a message
(for example, inserts message size, inserts records descriptions if necessary).
|
protected BinaryRecordDesc |
getRequestedRecordDesc(DataRecord record) |
protected boolean |
isWideDecimalSupported() |
protected void |
writeDescribeProtocolMessage(com.devexperts.io.BufferedOutput out,
ProtocolDescriptor descriptor) |
protected void |
writeEmptyHeartbeatMessage(com.devexperts.io.BufferedOutput out) |
protected void |
writeEventTimeSequence(long eventTimeSequence) |
protected void |
writeField(DataField field,
RecordCursor cursor) |
protected void |
writeHeartbeatMessage(com.devexperts.io.BufferedOutput out,
HeartbeatPayload heartbeatPayload) |
protected void |
writeHistorySubscriptionTime(DataRecord record,
long time) |
protected void |
writeIntField(DataIntField field,
int value) |
protected void |
writeMessageHeader(MessageType messageType)
Composes header for a message of a specific type.
|
protected void |
writeObjField(DataObjField field,
Object value) |
protected void |
writeOtherMessageBody(byte[] messageBytes,
int offset,
int length) |
protected int |
writeRecordHeader(DataRecord record,
int cipher,
String symbol,
int eventFlags) |
protected void |
writeRecordPayload(RecordCursor cursor,
int eventFlags) |
abortMessageAndRethrow, append, beginMessage, beginRecord, compose, composeDescribeProtocol, composeEmptyHeartbeat, composeHeartbeatMessage, composeTimeProgressReport, endMessage, flush, getEventTimeSequence, getMessagePayloadSize, hasCapacity, inMessage, resetSession, setOptSet, setOutput, setStats, setWriteEventTimeSequence, setWriteHeartbeat, undoWriteMessageHeaderStateChange, visitData, visitDescribeProtocol, visitHeartbeat, visitIntField, visitObjField, visitOtherMessage, visitRecord, visitRecord, visitSubscriptionvisitHistoryAddSubscription, visitHistoryData, visitHistoryRemoveSubscription, visitStreamAddSubscription, visitStreamData, visitStreamRemoveSubscription, visitTickerAddSubscription, visitTickerData, visitTickerRemoveSubscriptionpublic BinaryQTPComposer(DataScheme scheme, boolean describeRecords)
setOutput before using this composer.scheme - the data scheme.describeRecords - if true, then describe messages are composed right before
records are used for the first time and this instance keeps its state and shall not be
reused for different communication sessions. See AbstractQTPComposer.resetSession().protected void writeDescribeProtocolMessage(com.devexperts.io.BufferedOutput out,
ProtocolDescriptor descriptor)
throws IOException
writeDescribeProtocolMessage in class AbstractQTPComposerIOExceptionprotected void writeEmptyHeartbeatMessage(com.devexperts.io.BufferedOutput out)
throws IOException
writeEmptyHeartbeatMessage in class AbstractQTPComposerIOExceptionprotected void writeHeartbeatMessage(com.devexperts.io.BufferedOutput out,
HeartbeatPayload heartbeatPayload)
throws IOException
writeHeartbeatMessage in class AbstractQTPComposerIOExceptionprotected int writeRecordHeader(DataRecord record, int cipher, String symbol, int eventFlags) throws IOException
writeRecordHeader in class AbstractQTPComposerIOExceptionprotected void writeRecordPayload(RecordCursor cursor, int eventFlags) throws IOException
writeRecordPayload in class AbstractQTPComposerIOExceptionprotected void writeHistorySubscriptionTime(DataRecord record, long time) throws IOException
writeHistorySubscriptionTime in class AbstractQTPComposerIOExceptionprotected void writeEventTimeSequence(long eventTimeSequence)
throws IOException
writeEventTimeSequence in class AbstractQTPComposerIOExceptionprotected void writeIntField(DataIntField field, int value) throws IOException
writeIntField in class AbstractQTPComposerIOExceptionprotected void writeObjField(DataObjField field, Object value) throws IOException
writeObjField in class AbstractQTPComposerIOExceptionprotected void writeField(DataField field, RecordCursor cursor) throws IOException
writeField in class AbstractQTPComposerIOExceptionprotected void writeOtherMessageBody(byte[] messageBytes,
int offset,
int length)
throws IOException
writeOtherMessageBody in class AbstractQTPComposerIOExceptionprotected void writeMessageHeader(MessageType messageType) throws IOException
AbstractQTPComposerwriteMessageHeader in class AbstractQTPComposermessageType - the message type.IOException - never. If it has been thrown then it means an internal error.protected void finishComposingMessage(com.devexperts.io.BufferedOutput out)
throws IOException
AbstractQTPComposerBinaryQTPComposer. This implementation just copies message
from AbstractQTPComposer.msg to out.finishComposingMessage in class AbstractQTPComposerIOExceptionprotected BinaryRecordDesc getRequestedRecordDesc(DataRecord record)
protected boolean isWideDecimalSupported()
protected void describeRecord(DataRecord record) throws IOException
describeRecord in class AbstractQTPComposerIOExceptionCopyright © 2002–2025 Devexperts LLC. All rights reserved.