Class SimplePacketSender

java.lang.Object
com.mysql.cj.protocol.a.SimplePacketSender
All Implemented Interfaces:
MessageSender<NativePacketPayload>

public class SimplePacketSender
extends java.lang.Object
implements MessageSender<NativePacketPayload>
Simple implementation of MessageSender which handles the transmission of logical MySQL packets to the provided output stream. Large packets will be split into multiple chunks.
  • Constructor Summary

    Constructors 
    Constructor Description
    SimplePacketSender​(java.io.BufferedOutputStream outputStream)  
  • Method Summary

    Modifier and Type Method Description
    void send​(byte[] packet, int packetLen, byte packetSequence)
    Synchronously send the message to server.
    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