Top Fields Constructors Methods
com.mysql.cj.protocol.a

public Class DebugBufferingPacketSender

extends Object
implements MessageSender<NativePacketPayload>
Class Inheritance
All Implemented Interfaces
com.mysql.cj.protocol.MessageSender
Imports
java.io.IOException, java.util.LinkedList, com.mysql.cj.conf.RuntimeProperty, com.mysql.cj.protocol.MessageSender, com.mysql.cj.util.StringUtils

Field Summary

Modifier and TypeField and Description
private static final int
private int
private LinkedList<StringBuilder>
private RuntimeProperty<Integer>
private MessageSender<NativePacketPayload>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
pushPacketToDebugBuffer(byte[]
packet as bytes
packet
,
int
packet length
packetLen
)

Add a packet to the debug buffer.

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.mysql.cj.protocol.MessageSender.send.

Synchronously send the message to server.

public void
setMaxPacketDumpLength(int maxPacketDumpLength)

public MessageSender<NativePacketPayload>
undecorate()

Overrides default com.mysql.cj.protocol.MessageSender.undecorate.

Return the previous PacketSender instance from the decorators chain or the current PacketSender if it is the first entry in a chain.

public MessageSender<NativePacketPayload>
undecorateAll()

Overrides default com.mysql.cj.protocol.MessageSender.undecorateAll.

Return a PacketSender instance free of decorators.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEBUG_MSG_LENback to summary
private static final int DEBUG_MSG_LEN
maxPacketDumpLengthback to summary
private int maxPacketDumpLength
packetDebugBufferback to summary
private LinkedList<StringBuilder> packetDebugBuffer
packetDebugBufferSizeback to summary
private RuntimeProperty<Integer> packetDebugBufferSize
packetSenderback to summary
private MessageSender<NativePacketPayload> packetSender

Constructor Detail

DebugBufferingPacketSenderback to summary
public DebugBufferingPacketSender(MessageSender<NativePacketPayload> packetSender, LinkedList<StringBuilder> packetDebugBuffer, RuntimeProperty<Integer> packetDebugBufferSize)

Method Detail

pushPacketToDebugBufferback to summary
private void pushPacketToDebugBuffer(byte[] packet, int packetLen)

Add a packet to the debug buffer.

Parameters
packet:byte[]

packet as bytes

packetLen:int

packet length

sendback to summary
public void send(byte[] packet, int packetLen, byte packetSequence) throws IOException

Overrides default com.mysql.cj.protocol.MessageSender.send.

Doc from com.mysql.cj.protocol.MessageSender.send.

Synchronously send the message to server.

Parameters
packet:byte[]

byte array containing a message

packetLen:int

length of the message

packetSequence:byte

message sequence index (used in a native protocol)

Annotations
@Override
Exceptions
IOException:
if an error occurs
setMaxPacketDumpLengthback to summary
public void setMaxPacketDumpLength(int maxPacketDumpLength)
undecorateback to summary
public MessageSender<NativePacketPayload> undecorate()

Overrides default com.mysql.cj.protocol.MessageSender.undecorate.

Doc from com.mysql.cj.protocol.MessageSender.undecorate.

Return the previous PacketSender instance from the decorators chain or the current PacketSender if it is the first entry in a chain.

Returns:MessageSender<NativePacketPayload>

MessageSender instance

Annotations
@Override
undecorateAllback to summary
public MessageSender<NativePacketPayload> undecorateAll()

Overrides default com.mysql.cj.protocol.MessageSender.undecorateAll.

Doc from com.mysql.cj.protocol.MessageSender.undecorateAll.

Return a PacketSender instance free of decorators.

Returns:MessageSender<NativePacketPayload>

MessageSender instance

Annotations
@Override