|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.postgresql.core.ConnectionFactory
public abstract class ConnectionFactory
Handles protocol-specific connection setup.
| Constructor Summary | |
|---|---|
ConnectionFactory()
|
|
| Method Summary | |
|---|---|
static ProtocolConnection |
openConnection(String host,
int port,
String user,
String database,
Properties info,
Logger logger)
Establishes and initializes a new connection. |
abstract ProtocolConnection |
openConnectionImpl(String host,
int port,
String user,
String database,
Properties info,
Logger logger)
Implementation of openConnection(java.lang.String, int, java.lang.String, java.lang.String, java.util.Properties, org.postgresql.core.Logger) for a particular protocol version. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionFactory()
| Method Detail |
|---|
public static ProtocolConnection openConnection(String host,
int port,
String user,
String database,
Properties info,
Logger logger)
throws SQLException
If the "protocolVersion" property is specified, only that protocol version is tried. Otherwise, all protocols are tried in order, falling back to older protocols as necessary.
Currently, protocol versions 3 (7.4+) and 2 (pre-7.4) are supported.
host - the host to connect toport - the port to connect touser - 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.logger - the logger to use for this connection
SQLException - if the connection could not be established.
public abstract ProtocolConnection openConnectionImpl(String host,
int port,
String user,
String database,
Properties info,
Logger logger)
throws SQLException
openConnection(java.lang.String, int, java.lang.String, java.lang.String, java.util.Properties, org.postgresql.core.Logger) for a particular protocol version.
Implemented by subclasses of ConnectionFactory.
host - the host to connect toport - the port to connect touser - 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.logger - the logger to use for this connection
null if this protocol
version is not supported by the server.
SQLException - if the connection could not be established for a reason other
than protocol version incompatibility.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||