public interface SocketFactory extends SocketMetadata
| Modifier and Type | Method and Description |
|---|---|
default void |
afterHandshake()
Called by the driver after completing the MySQL protocol handshake and
reading the results of the authentication.
|
default void |
beforeHandshake()
Called by the driver before issuing the MySQL protocol handshake.
|
<T extends java.io.Closeable> |
connect(java.lang.String host,
int portNumber,
PropertySet props,
int loginTimeout)
Creates a new socket or channel using the given properties.
|
<T extends java.io.Closeable> |
performTlsHandshake(SocketConnection socketConnection,
ServerSession serverSession)
If required, called by the driver during MySQL protocol handshake to transform
original socket to SSL socket and perform TLS handshake.
|
default <T extends java.io.Closeable> |
performTlsHandshake(SocketConnection socketConnection,
ServerSession serverSession,
Log log)
If required, called by the driver during MySQL protocol handshake to transform
original socket to SSL socket and perform TLS handshake.
|
isLocallyConnected, isLocallyConnected<T extends java.io.Closeable> T connect(java.lang.String host,
int portNumber,
PropertySet props,
int loginTimeout)
throws java.io.IOException
com.mysql.cj.protocol.StandardSocketFactory Implementing classes
are responsible for handling synchronization of this method (if needed).T - result typehost - the hostname passed in the URL. It will be a single
hostname, as the driver parses multi-hosts (for failover) and
calls this method for each host connection attempt.portNumber - the port number to connect to (if required).props - properties passed to the driver via the URL and/or properties
instance.loginTimeout - login timeout in millisecondsjava.io.IOException - if an I/O error occursdefault void beforeHandshake()
throws java.io.IOException
java.io.IOException - if an I/O error occurs<T extends java.io.Closeable> T performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession) throws java.io.IOException
T - result typesocketConnection - current SocketConnectionserverSession - current ServerSessionjava.io.IOException - if an I/O error occursdefault <T extends java.io.Closeable> T performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession, Log log) throws java.io.IOException
T - result typesocketConnection - current SocketConnectionserverSession - current ServerSessionlog - loggerjava.io.IOException - if an I/O error occursdefault void afterHandshake()
throws java.io.IOException
java.io.IOException - if an I/O error occurs