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 voidsend(byte[] packet, int packetLen, byte packetSequence)Synchronously send the message to server.voidsetMaxPacketDumpLength(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, waitMethods 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:MessageSenderSynchronously send the message to server.- Specified by:
sendin 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:MessageSenderReturn a PacketSender instance free of decorators.- Specified by:
undecorateAllin interfaceMessageSender<NativePacketPayload>- Returns:
MessageSenderinstance
-
undecorate
Description copied from interface:MessageSenderReturn the previous PacketSender instance from the decorators chain or the current PacketSender if it is the first entry in a chain.- Specified by:
undecoratein interfaceMessageSender<NativePacketPayload>- Returns:
MessageSenderinstance
-