Package com.mysql.cj.protocol.a
Class DebugBufferingPacketSender
java.lang.Object
com.mysql.cj.protocol.a.DebugBufferingPacketSender
- All Implemented Interfaces:
MessageSender<NativePacketPayload>
public class DebugBufferingPacketSender extends java.lang.Object implements MessageSender<NativePacketPayload>
-
Constructor Summary
Constructors Constructor Description DebugBufferingPacketSender(MessageSender<NativePacketPayload> packetSender, java.util.LinkedList<java.lang.StringBuilder> packetDebugBuffer, RuntimeProperty<java.lang.Integer> packetDebugBufferSize)
-
Method Summary
Modifier and Type Method Description void
send(byte[] packet, int packetLen, byte packetSequence)
Synchronously send the message to server.void
setMaxPacketDumpLength(int maxPacketDumpLength)
MessageSender<NativePacketPayload>
undecorate()
Return the previous PacketSender instance from the decorators chain or the current PacketSender if it is the first entry in a chain.MessageSender<NativePacketPayload>
undecorateAll()
Return a PacketSender instance free of decorators.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.mysql.cj.protocol.MessageSender
send, send, setMaxAllowedPacket
-
Constructor Details
-
DebugBufferingPacketSender
public DebugBufferingPacketSender(MessageSender<NativePacketPayload> packetSender, java.util.LinkedList<java.lang.StringBuilder> packetDebugBuffer, RuntimeProperty<java.lang.Integer> packetDebugBufferSize)
-
-
Method Details
-
setMaxPacketDumpLength
public void setMaxPacketDumpLength(int maxPacketDumpLength) -
send
public void send(byte[] packet, int packetLen, byte packetSequence) throws java.io.IOExceptionDescription copied from interface:MessageSender
Synchronously send the message to server.- Specified by:
send
in interfaceMessageSender<NativePacketPayload>
- Parameters:
packet
- byte array containing a messagepacketLen
- length of the messagepacketSequence
- message sequence index (used in a native protocol)- Throws:
java.io.IOException
- if an error occurs
-
undecorateAll
Description copied from interface:MessageSender
Return a PacketSender instance free of decorators.- Specified by:
undecorateAll
in interfaceMessageSender<NativePacketPayload>
- Returns:
MessageSender
instance
-
undecorate
Description copied from interface:MessageSender
Return the previous PacketSender instance from the decorators chain or the current PacketSender if it is the first entry in a chain.- Specified by:
undecorate
in interfaceMessageSender<NativePacketPayload>
- Returns:
MessageSender
instance
-