Class SocketFactory (1.14.1)

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 CoreSocketFactory 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
Name Description
socketFactoryConstructorArg String

Fields

props

protected Properties props
Field Value
Type Description
Properties

Methods

createSocket()

public Socket createSocket()
Returns
Type Description
Socket
Overrides
Exceptions
Type Description
IOException

createSocket(String host, int port)

public Socket createSocket(String host, int port)
Parameters
Name Description
host String
port int
Returns
Type Description
Socket
Overrides

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

public Socket createSocket(String host, int port, InetAddress localHost, int localPort)
Parameters
Name Description
host String
port int
localHost InetAddress
localPort int
Returns
Type Description
Socket
Overrides

createSocket(InetAddress host, int port)

public Socket createSocket(InetAddress host, int port)
Parameters
Name Description
host InetAddress
port int
Returns
Type Description
Socket
Overrides

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

public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
Parameters
Name Description
address InetAddress
port int
localAddress InetAddress
localPort int
Returns
Type Description
Socket
Overrides