public class SocketFactoryWrapper extends StandardSocketFactory implements SocketFactory
SocketFactoryhost, loginTimeoutCheckTimestamp, loginTimeoutCountdown, port, rawSocket, socketTimeoutBackup, sslSocket| Constructor and Description |
|---|
SocketFactoryWrapper(java.lang.Object legacyFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterHandshake()
Called by the driver after completing the MySQL protocol handshake and
reading the results of the authentication.
|
void |
beforeHandshake()
Called by the driver before issuing the MySQL protocol handshake.
|
<T extends java.io.Closeable> |
connect(java.lang.String hostname,
int portNumber,
PropertySet pset,
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.
|
createSocket, getRealTimeout, resetLoginTimeCountdownclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisLocallyConnected, isLocallyConnectedpublic <T extends java.io.Closeable> T connect(java.lang.String hostname,
int portNumber,
PropertySet pset,
int loginTimeout)
throws java.io.IOException
SocketFactorycom.mysql.cj.protocol.StandardSocketFactory Implementing classes
are responsible for handling synchronization of this method (if needed).connect in interface SocketFactoryconnect in class StandardSocketFactoryT - result typehostname - 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).pset - properties passed to the driver via the URL and/or properties
instance.loginTimeout - login timeout in millisecondsjava.io.IOException - if an I/O error occurspublic <T extends java.io.Closeable> T performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession) throws java.io.IOException
SocketFactoryperformTlsHandshake in interface SocketFactoryperformTlsHandshake in class StandardSocketFactoryT - result typesocketConnection - current SocketConnectionserverSession - current ServerSessionjava.io.IOException - if an I/O error occurspublic void beforeHandshake()
throws java.io.IOException
SocketFactorybeforeHandshake in interface SocketFactorybeforeHandshake in class StandardSocketFactoryjava.io.IOException - if an I/O error occurspublic void afterHandshake()
throws java.io.IOException
SocketFactoryafterHandshake in interface SocketFactoryafterHandshake in class StandardSocketFactoryjava.io.IOException - if an I/O error occurs