Package com.google.cloud.sql.postgres
Class SocketFactory
java.lang.Object
javax.net.SocketFactory
com.google.cloud.sql.postgres.SocketFactory
public class SocketFactory extends SocketFactory
A Postgres
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 Summary
Constructors Constructor Description SocketFactory(String instanceName)Deprecated.SocketFactory(Properties info)Implements theSocketFactoryconstructor, which can be used to create authenticated connections to a Cloud SQL instance. -
Method Summary
Modifier and Type Method Description SocketcreateSocket()SocketcreateSocket(String host, int port)SocketcreateSocket(String host, int port, InetAddress localHost, int localPort)SocketcreateSocket(InetAddress host, int port)SocketcreateSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
-
Constructor Details
-
SocketFactory
Implements theSocketFactoryconstructor, which can be used to create authenticated connections to a Cloud SQL instance. -
SocketFactory
Deprecated.
-
-
Method Details
-
createSocket
- Overrides:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-