| Modifier and Type | Field and Description |
|---|---|
| protected String | host
The hostname to connect to |
| protected long | loginTimeoutCheckTimestamp
Time when last Login Timeout check occurred |
| protected int | loginTimeoutCountdown
The remaining login time in milliseconds. |
| protected int | port
The port number to connect to |
| protected Socket | rawSocket
The underlying TCP/IP socket to use |
| protected int | socketTimeoutBackup
Backup original Socket timeout to be restored after handshake |
| protected Socket | sslSocket
The wrapper for underlying TCP/IP socket |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterHandshake()
Overrides default com. Called by the driver after completing the MySQL protocol handshake and reading the results of the authentication. |
| public void | beforeHandshake()
Overrides default com. Called by the driver before issuing the MySQL protocol handshake. |
| protected void | configureSocket(Socket
socket sock, PropertySet properties pset)Configures socket properties based on properties from the connection (tcpNoDelay, snd/rcv buf, traffic class, etc). |
| public <T extends Closeable> T | connect(String
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. hostname, int the port number to connect to (if required). portNumber, PropertySet properties passed to the driver via the URL and/or properties
instance. pset, int login timeout in milliseconds loginTimeout)Implements com. Creates a new socket or channel using the given properties. |
| protected Socket | Returns: socketproperties available to affect behaviour during socket creation. props)Create the raw socket. |
| protected int | Returns: The timeout to be used.The timeout to validate. expectedTimeout)Validates the connection/socket timeout that must really be used. |
| public <T extends Closeable> T | performTlsHandshake(SocketConnection
current SocketConnection socketConnection, ServerSession current ServerSession serverSession)Implements com. If required, called by the driver during MySQL protocol handshake to transform original socket to SSL socket and perform TLS handshake. |
| public <T extends Closeable> T | performTlsHandshake(SocketConnection
current SocketConnection socketConnection, ServerSession current ServerSession serverSession, Log logger log)Overrides default com. If required, called by the driver during MySQL protocol handshake to transform original socket to SSL socket and perform TLS handshake. |
| protected void |
| host | back to summary |
|---|---|
| protected String host The hostname to connect to | |
| loginTimeoutCheckTimestamp | back to summary |
|---|---|
| protected long loginTimeoutCheckTimestamp Time when last Login Timeout check occurred | |
| loginTimeoutCountdown | back to summary |
|---|---|
| protected int loginTimeoutCountdown The remaining login time in milliseconds. Initial value set from defined DriverManager.setLoginTimeout() | |
| port | back to summary |
|---|---|
| protected int port The port number to connect to | |
| rawSocket | back to summary |
|---|---|
| protected Socket rawSocket The underlying TCP/IP socket to use | |
| socketTimeoutBackup | back to summary |
|---|---|
| protected int socketTimeoutBackup Backup original Socket timeout to be restored after handshake | |
| sslSocket | back to summary |
|---|---|
| protected Socket sslSocket The wrapper for underlying TCP/IP socket | |
| StandardSocketFactory | back to summary |
|---|---|
| public StandardSocketFactory() | |
| afterHandshake | back to summary |
|---|---|
| public void afterHandshake() throws IOException Overrides default com. Doc from com. Called by the driver after completing the MySQL protocol handshake and reading the results of the authentication.
| |
| beforeHandshake | back to summary |
|---|---|
| public void beforeHandshake() throws IOException Overrides default com. Doc from com. Called by the driver before issuing the MySQL protocol handshake.
| |
| configureSocket | back to summary |
|---|---|
| protected void configureSocket(Socket sock, PropertySet pset) throws SocketException, IOException Configures socket properties based on properties from the connection (tcpNoDelay, snd/rcv buf, traffic class, etc).
| |
| connect | back to summary |
|---|---|
| public <T extends Closeable> T connect(String hostname, int portNumber, PropertySet pset, int loginTimeout) throws IOException Implements com. Doc from com. Creates a new socket or channel using the given properties. Properties are parsed by
the driver from the URL. All properties other than sensitive ones (user
and password) are passed to this method. The driver will instantiate the
socket factory with the class name given in the property
"socketFactory", where the standard is
| |
| createSocket | back to summary |
|---|---|
| protected Socket createSocket(PropertySet props) Create the raw socket.
| |
| getRealTimeout | back to summary |
|---|---|
| protected int getRealTimeout(int expectedTimeout) Validates the connection/socket timeout that must really be used.
| |
| performTlsHandshake | back to summary |
|---|---|
| public <T extends Closeable> T performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession) throws IOException Implements com. Doc from com. If required, called by the driver during MySQL protocol handshake to transform original socket to SSL socket and perform TLS handshake.
| |
| performTlsHandshake | back to summary |
|---|---|
| public <T extends Closeable> T performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession, Log log) throws IOException Overrides default com. Doc from com. If required, called by the driver during MySQL protocol handshake to transform original socket to SSL socket and perform TLS handshake.
| |
| resetLoginTimeCountdown | back to summary |
|---|---|
| protected void resetLoginTimeCountdown() throws SocketException Decrements elapsed time since last reset from login timeout count down.
| |