public class AsyncSocketFactory extends java.lang.Object implements SocketFactory
Constructor and Description |
---|
AsyncSocketFactory() |
Modifier and Type | Method and Description |
---|---|
<T extends java.io.Closeable> |
connect(java.lang.String host,
int port,
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
afterHandshake, beforeHandshake
isLocallyConnected, isLocallyConnected
public <T extends java.io.Closeable> T connect(java.lang.String host, int port, PropertySet props, int loginTimeout) throws java.io.IOException
SocketFactory
com.mysql.cj.protocol.StandardSocketFactory
Implementing classes
are responsible for handling synchronization of this method (if needed).connect
in interface SocketFactory
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.port
- 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 occurspublic <T extends java.io.Closeable> T performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession) throws java.io.IOException
SocketFactory
performTlsHandshake
in interface SocketFactory
T
- result typesocketConnection
- current SocketConnectionserverSession
- current ServerSessionjava.io.IOException
- if an I/O error occurs