Package org.postgresql.core.v3
Class ConnectionFactoryImpl
- java.lang.Object
-
- org.postgresql.core.ConnectionFactory
-
- org.postgresql.core.v3.ConnectionFactoryImpl
-
public class ConnectionFactoryImpl extends ConnectionFactory
ConnectionFactory implementation for version 3 (7.4+) connections.- Author:
- Oliver Jowett (oliver@opencloud.com), based on the previous implementation
-
-
Constructor Summary
Constructors Constructor Description ConnectionFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryExecutoropenConnectionImpl(HostSpec[] hostSpecs, String user, String database, Properties info)Implementation ofConnectionFactory.openConnection(org.postgresql.util.HostSpec[], java.lang.String, java.lang.String, java.util.Properties)for a particular protocol version.-
Methods inherited from class org.postgresql.core.ConnectionFactory
closeStream, openConnection
-
-
-
-
Method Detail
-
openConnectionImpl
public QueryExecutor openConnectionImpl(HostSpec[] hostSpecs, String user, String database, Properties info) throws SQLException
Description copied from class:ConnectionFactoryImplementation ofConnectionFactory.openConnection(org.postgresql.util.HostSpec[], java.lang.String, java.lang.String, java.util.Properties)for a particular protocol version. Implemented by subclasses ofConnectionFactory.- Specified by:
openConnectionImplin classConnectionFactory- Parameters:
hostSpecs- at least one host and port to connect to; multiple elements for round-robin failoveruser- the username to authenticate with; may not be null.database- the database on the server to connect to; may not be null.info- extra properties controlling the connection; notably, "password" if present supplies the password to authenticate with.- Returns:
- the new, initialized, connection, or
nullif this protocol version is not supported by the server. - Throws:
SQLException- if the connection could not be established for a reason other than protocol version incompatibility.
-
-