Class SocketFactory (1.14.1-SNAPSHOT)

public class SocketFactory implements SocketFactory

A MySQL SocketFactory that establishes a secure connection to a Cloud SQL instance using ephemeral certificates.

The heavy lifting is done by the singleton CoreSocketFactory class.

Inheritance

java.lang.Object > SocketFactory

Implements

com.mysql.cj.protocol.SocketFactory

Constructors

SocketFactory()

public SocketFactory()

Methods

<T>connect(String host, int portNumber, PropertySet props, int loginTimeout)

public T <T>connect(String host, int portNumber, PropertySet props, int loginTimeout)
Parameters
NameDescription
hostString
portNumberint
propscom.mysql.cj.conf.PropertySet
loginTimeoutint
Returns
TypeDescription
T
Exceptions
TypeDescription
IOException

<T>connect(String host, int portNumber, Properties props, int loginTimeout)

public T <T>connect(String host, int portNumber, Properties props, int loginTimeout)

Implements the interface for com.mysql.cj.protocol.SocketFactory for mysql-connector-java prior to version 8.0.13. This change is required for backwards compatibility.

Parameters
NameDescription
hostString
portNumberint
propsProperties
loginTimeoutint
Returns
TypeDescription
T
Exceptions
TypeDescription
IOException
InterruptedException

<T>performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession)

public T <T>performTlsHandshake(SocketConnection socketConnection, ServerSession serverSession)
Parameters
NameDescription
socketConnectioncom.mysql.cj.protocol.SocketConnection
serverSessioncom.mysql.cj.protocol.ServerSession
Returns
TypeDescription
T
Exceptions
TypeDescription
IOException

afterHandshake()

public void afterHandshake()

beforeHandshake()

public void beforeHandshake()