Top Fields Constructors Methods
com.mysql.cj.protocol

public abstract Class AbstractProtocol<M extends Message>

extends Object
implements Protocol<M extends Message>, ProtocolEventHandler
Class Inheritance
All Implemented Interfaces
com.mysql.cj.protocol.Protocol.ProtocolEventHandler, com.mysql.cj.protocol.Protocol
Known Direct Subclasses
com.mysql.cj.protocol.a.NativeProtocol, com.mysql.cj.protocol.x.XProtocol
Imports
java.lang.ref.WeakReference, java.util.LinkedList, java.util.concurrent.CopyOnWriteArrayList, com.mysql.cj.MessageBuilder, .Messages, .Session, .TransactionEventHandler, com.mysql.cj.conf.PropertyKey, .PropertySet, com.mysql.cj.exceptions.ExceptionInterceptor, com.mysql.cj.log.Log, com.mysql.cj.protocol.Protocol.ProtocolEventHandler, .Protocol.ProtocolEventListener.EventType, com.mysql.cj.util.TimeUtil

Field Summary

Modifier and TypeField and Description
protected AuthenticationProvider<M>
protected ExceptionInterceptor
private CopyOnWriteArrayList<WeakReference<Protocol.ProtocolEventListener>>
protected transient Log
log

The logger we're going to use

protected MessageBuilder<M>
protected LinkedList<StringBuilder>
private PacketReceivedTimeHolder
private PacketSentTimeHolder
protected PropertySet
protected String
protected Session
protected SocketConnection
protected TransactionEventHandler
protected boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public AuthenticationProvider<M>
public ExceptionInterceptor
public MessageBuilder<M>
public PacketReceivedTimeHolder
public PacketSentTimeHolder
public PropertySet
public String
public SocketConnection
public void
public void
public void
public void
reset()

Implements com.mysql.cj.protocol.Protocol.reset.

Return Protocol to its initial state right after successful connect.

public void
public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

authProviderback to summary
protected AuthenticationProvider<M> authProvider
exceptionInterceptorback to summary
protected ExceptionInterceptor exceptionInterceptor
listenersback to summary
private CopyOnWriteArrayList<WeakReference<Protocol.ProtocolEventListener>> listeners
logback to summary
protected transient Log log

The logger we're going to use

messageBuilderback to summary
protected MessageBuilder<M> messageBuilder
packetDebugRingBufferback to summary
protected LinkedList<StringBuilder> packetDebugRingBuffer
packetReceivedTimeHolderback to summary
private PacketReceivedTimeHolder packetReceivedTimeHolder
packetSentTimeHolderback to summary
private PacketSentTimeHolder packetSentTimeHolder
propertySetback to summary
protected PropertySet propertySet
queryTimingUnitsback to summary
protected String queryTimingUnits
sessionback to summary
protected Session session
socketConnectionback to summary
protected SocketConnection socketConnection
transactionManagerback to summary
protected TransactionEventHandler transactionManager
useNanosForElapsedTimeback to summary
protected boolean useNanosForElapsedTime

Constructor Detail

AbstractProtocolback to summary
public AbstractProtocol()

Method Detail

addListenerback to summary
public void addListener(Protocol.ProtocolEventListener l)

Implements com.mysql.cj.protocol.Protocol.ProtocolEventHandler.addListener.

Doc from com.mysql.cj.protocol.Protocol.ProtocolEventHandler.addListener.

Add listener for this protocol events.

Parameters
l:Protocol.ProtocolEventListener

ProtocolEventListener instance.

Annotations
@Override
getAuthenticationProviderback to summary
public AuthenticationProvider<M> getAuthenticationProvider()

Implements com.mysql.cj.protocol.Protocol.getAuthenticationProvider.

Annotations
@Override
getExceptionInterceptorback to summary
public ExceptionInterceptor getExceptionInterceptor()

Implements com.mysql.cj.protocol.Protocol.getExceptionInterceptor.

Annotations
@Override
getMessageBuilderback to summary
public MessageBuilder<M> getMessageBuilder()

Implements com.mysql.cj.protocol.Protocol.getMessageBuilder.

Annotations
@Override
getPacketReceivedTimeHolderback to summary
public PacketReceivedTimeHolder getPacketReceivedTimeHolder()

Implements com.mysql.cj.protocol.Protocol.getPacketReceivedTimeHolder.

Annotations
@Override
getPacketSentTimeHolderback to summary
public PacketSentTimeHolder getPacketSentTimeHolder()

Implements com.mysql.cj.protocol.Protocol.getPacketSentTimeHolder.

Annotations
@Override
getPropertySetback to summary
public PropertySet getPropertySet()

Implements com.mysql.cj.protocol.Protocol.getPropertySet.

Annotations
@Override
getQueryTimingUnitsback to summary
public String getQueryTimingUnits()

Implements com.mysql.cj.protocol.Protocol.getQueryTimingUnits.

Annotations
@Override
getSocketConnectionback to summary
public SocketConnection getSocketConnection()

Implements com.mysql.cj.protocol.Protocol.getSocketConnection.

Annotations
@Override
initback to summary
public void init(Session sess, SocketConnection phConnection, PropertySet propSet, TransactionEventHandler trManager)

Implements com.mysql.cj.protocol.Protocol.init.

Doc from com.mysql.cj.protocol.Protocol.init.

Init method takes the place of constructor. A constructor should be used unless the encapsulation of ProtocolFactory is necessary.

Parameters
sess:Session

Session

phConnection:SocketConnection

SocketConnection

propSet:PropertySet

PropertySet

trManager:TransactionEventHandler

TransactionEventHandler

Annotations
@Override
invokeListenersback to summary
public void invokeListeners(Protocol.ProtocolEventListener.EventType type, Throwable reason)

Implements com.mysql.cj.protocol.Protocol.ProtocolEventHandler.invokeListeners.

Annotations
@Override
removeListenerback to summary
public void removeListener(Protocol.ProtocolEventListener listener)

Implements com.mysql.cj.protocol.Protocol.ProtocolEventHandler.removeListener.

Doc from com.mysql.cj.protocol.Protocol.ProtocolEventHandler.removeListener.

Remove protocol listener.

Parameters
listener:Protocol.ProtocolEventListener

ProtocolEventListener instance.

Annotations
@Override
resetback to summary
public void reset()

Implements com.mysql.cj.protocol.Protocol.reset.

Doc from com.mysql.cj.protocol.Protocol.reset.

Return Protocol to its initial state right after successful connect.

Annotations
@Override
setPacketReceivedTimeHolderback to summary
public void setPacketReceivedTimeHolder(PacketReceivedTimeHolder packetReceivedTimeHolder)

Implements com.mysql.cj.protocol.Protocol.setPacketReceivedTimeHolder.

Annotations
@Override
setPacketSentTimeHolderback to summary
public void setPacketSentTimeHolder(PacketSentTimeHolder packetSentTimeHolder)

Implements com.mysql.cj.protocol.Protocol.setPacketSentTimeHolder.

Annotations
@Override
setPropertySetback to summary
public void setPropertySet(PropertySet propertySet)

Implements com.mysql.cj.protocol.Protocol.setPropertySet.

Annotations
@Override