MessageReader which put debugging info to a ring-buffer.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private String | |
| private static final int | MAX_PACKET_DUMP_LENGTH
Max number of bytes to dump when tracing the protocol |
| private LinkedList | |
| private RuntimeProperty | |
| private MessageReader | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | DebugBufferingPacketReader(MessageReader<NativePacketHeader, NativePacketPayload> packetReader, LinkedList<StringBuilder> packetDebugBuffer, RuntimeProperty<Integer> packetDebugBufferSize)
|
| Modifier and Type | Method and Description |
|---|---|
| public byte | getMessageSequence()
Overrides default com. Get last message sequence number, as it was stored by |
| public NativePacketHeader | probeHeader()
Overrides default com. Read the next message header from server, possibly blocking indefinitely until the message is received,
and cache it so that the next |
| public NativePacketPayload | probeMessage(Optional<NativePacketPayload>
Message object to reuse. May be ignored by implementation.MessageHeader instanceOverrides default com. Read message from server into to the given |
| public NativePacketHeader | readHeader()
Implements com. Read the next message header from server, possibly blocking indefinitely until the message is received. |
| private NativePacketHeader | |
| public NativePacketPayload | readMessage(Optional<NativePacketPayload>
Message object to reuse. May be ignored by implementation.MessageHeader instanceImplements com. Read message from server into to the given |
| public void | resetMessageSequence()
Overrides default com. Set stored message sequence number to 0. |
| public MessageReader | undecorate()
Overrides default com. Return the previous MessageReader instance from the decorators chain or the current MessageReader if it is the first entry in a chain. |
| public MessageReader | undecorateAll()
Overrides default com. Return a MessageReader instance free of decorators. |
| DEBUG_MSG_LEN | back to summary |
|---|---|
| private static final int DEBUG_MSG_LEN | |
| lastHeaderPayload | back to summary |
|---|---|
| private String lastHeaderPayload | |
| MAX_PACKET_DUMP_LENGTH | back to summary |
|---|---|
| private static final int MAX_PACKET_DUMP_LENGTH Max number of bytes to dump when tracing the protocol | |
| packetDebugBuffer | back to summary |
|---|---|
| private LinkedList<StringBuilder> packetDebugBuffer | |
| packetDebugBufferSize | back to summary |
|---|---|
| private RuntimeProperty<Integer> packetDebugBufferSize | |
| packetReader | back to summary |
|---|---|
| private MessageReader<NativePacketHeader, NativePacketPayload> packetReader | |
| packetSequenceReset | back to summary |
|---|---|
| private boolean packetSequenceReset | |
| DebugBufferingPacketReader | back to summary |
|---|---|
| public DebugBufferingPacketReader(MessageReader<NativePacketHeader, NativePacketPayload> packetReader, LinkedList<StringBuilder> packetDebugBuffer, RuntimeProperty<Integer> packetDebugBufferSize) | |
| getMessageSequence | back to summary |
|---|---|
| public byte getMessageSequence() Overrides default com. Doc from com. Get last message sequence number, as it was stored by
| |
| probeHeader | back to summary |
|---|---|
| public NativePacketHeader probeHeader() throws IOException Overrides default com. Doc from com. Read the next message header from server, possibly blocking indefinitely until the message is received,
and cache it so that the next
| |
| probeMessage | back to summary |
|---|---|
| public NativePacketPayload probeMessage(Optional<NativePacketPayload> reuse, NativePacketHeader header) throws IOException Overrides default com. Doc from com. Read message from server into to the given
| |
| readHeader | back to summary |
|---|---|
| public NativePacketHeader readHeader() throws IOException Implements com. Doc from com. Read the next message header from server, possibly blocking indefinitely until the message is received.
| |
| readHeaderLocal | back to summary |
|---|---|
| private NativePacketHeader readHeaderLocal(byte prevPacketSeq, NativePacketHeader hdr) throws IOException | |
| readMessage | back to summary |
|---|---|
| public NativePacketPayload readMessage(Optional<NativePacketPayload> reuse, NativePacketHeader header) throws IOException Implements com. Doc from com. Read message from server into to the given
| |
| resetMessageSequence | back to summary |
|---|---|
| public void resetMessageSequence() Overrides default com. Doc from com. Set stored message sequence number to 0.
| |
| undecorate | back to summary |
|---|---|
| public MessageReader Overrides default com. Doc from com. Return the previous MessageReader instance from the decorators chain or the current MessageReader if it is the first entry in a chain.
| |
| undecorateAll | back to summary |
|---|---|
| public MessageReader Overrides default com. Doc from com. Return a MessageReader instance free of decorators.
| |