MessageSender which traces all sent packets to the provided logger.
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| private Log | |
| private MessageSender | |
| private long |
| Access | Constructor and Description |
|---|---|
| public | TracingPacketSender(MessageSender<NativePacketPayload> packetSender, Log log, String host, long serverThreadId)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | logPacket(byte[]
packet as bytes packet, int packet length packetLen, byte sequence index packetSequence)Log the packet details to the provided logger. |
| public void | send(byte[]
byte array containing a message packet, int length of the message packetLen, byte message sequence index (used in a native protocol) packetSequence)Overrides default com. Synchronously send the message to server. |
| public void | |
| public MessageSender | undecorate()
Overrides default com. Return the previous PacketSender instance from the decorators chain or the current PacketSender if it is the first entry in a chain. |
| public MessageSender | undecorateAll()
Overrides default com. Return a PacketSender instance free of decorators. |
| host | back to summary |
|---|---|
| private String host | |
| log | back to summary |
|---|---|
| private Log log | |
| packetSender | back to summary |
|---|---|
| private MessageSender<NativePacketPayload> packetSender | |
| serverThreadId | back to summary |
|---|---|
| private long serverThreadId | |
| TracingPacketSender | back to summary |
|---|---|
| public TracingPacketSender(MessageSender<NativePacketPayload> packetSender, Log log, String host, long serverThreadId) | |
| logPacket | back to summary |
|---|---|
| private void logPacket(byte[] packet, int packetLen, byte packetSequence) Log the packet details to the provided logger.
| |
| send | back to summary |
|---|---|
| public void send(byte[] packet, int packetLen, byte packetSequence) throws IOException Overrides default com. Doc from com. Synchronously send the message to server.
| |
| setServerThreadId | back to summary |
|---|---|
| public void setServerThreadId(long serverThreadId) | |
| undecorate | back to summary |
|---|---|
| public MessageSender Overrides default com. Doc from com. Return the previous PacketSender instance from the decorators chain or the current PacketSender if it is the first entry in a chain.
| |
| undecorateAll | back to summary |
|---|---|
| public MessageSender Overrides default com. Doc from com. Return a PacketSender instance free of decorators.
| |