public class SocketFactory extends SocketFactory
SocketFactory that establishes a secure connection to a Cloud SQL instance
using ephemeral certificates.
The heavy lifting is done by the singleton CoreSocketFactory class.
| Constructor and Description |
|---|
SocketFactory(Properties info)
Implements the
SocketFactory constructor, which can be used to create authenticated
connections to a Cloud SQL instance. |
SocketFactory(String instanceName)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
Socket |
createSocket() |
Socket |
createSocket(InetAddress host,
int port) |
Socket |
createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort) |
Socket |
createSocket(String host,
int port) |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int localPort) |
getDefaultpublic SocketFactory(Properties info)
SocketFactory constructor, which can be used to create authenticated
connections to a Cloud SQL instance.@Deprecated public SocketFactory(String instanceName)
public Socket createSocket() throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(InetAddress host, int port) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
createSocket in class SocketFactoryIOExceptionCopyright © 2022. All rights reserved.