Class SocketFactory (1.15.0)

public class SocketFactory extends SocketFactory

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

The heavy lifting is done by the singleton InternalConnectorRegistry class.

Inheritance

java.lang.Object > SocketFactory > SocketFactory

Constructors

SocketFactory(String socketFactoryConstructorArg)

public SocketFactory(String socketFactoryConstructorArg)

Implements the SocketFactory constructor, which can be used to create authenticated connections to a Cloud SQL instance.

Parameter
NameDescription
socketFactoryConstructorArgString

Fields

props

protected Properties props
Field Value
TypeDescription
Properties

Methods

createSocket()

public Socket createSocket()
Returns
TypeDescription
Socket
Overrides
Exceptions
TypeDescription
IOException

createSocket(String host, int port)

public Socket createSocket(String host, int port)
Parameters
NameDescription
hostString
portint
Returns
TypeDescription
Socket
Overrides

createSocket(String host, int port, InetAddress localHost, int localPort)

public Socket createSocket(String host, int port, InetAddress localHost, int localPort)
Parameters
NameDescription
hostString
portint
localHostInetAddress
localPortint
Returns
TypeDescription
Socket
Overrides

createSocket(InetAddress host, int port)

public Socket createSocket(InetAddress host, int port)
Parameters
NameDescription
hostInetAddress
portint
Returns
TypeDescription
Socket
Overrides

createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)

public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
Parameters
NameDescription
addressInetAddress
portint
localAddressInetAddress
localPortint
Returns
TypeDescription
Socket
Overrides