Package org.postgresql.ds
Class PGPooledConnection.ConnectionHandler
- java.lang.Object
-
- org.postgresql.ds.PGPooledConnection.ConnectionHandler
-
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
- Enclosing class:
- PGPooledConnection
private class PGPooledConnection.ConnectionHandler extends java.lang.Object implements java.lang.reflect.InvocationHandler
Instead of declaring a class implementing Connection, which would have to be updated for every JDK rev, use a dynamic proxy to handle all calls through the Connection interface. This is the part that requires JDK 1.3 or higher, though JDK 1.2 could be supported with a 3rd-party proxy package.
-
-
Constructor Summary
Constructors Constructor Description ConnectionHandler(java.sql.Connection con)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
(package private) java.sql.Connection
getProxy()
java.lang.Object
invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
boolean
isClosed()
(package private) void
setProxy(java.sql.Connection proxy)
-
-
-
Method Detail
-
invoke
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
- Specified by:
invoke
in interfacejava.lang.reflect.InvocationHandler
- Throws:
java.lang.Throwable
-
getProxy
java.sql.Connection getProxy()
-
setProxy
void setProxy(java.sql.Connection proxy)
-
close
public void close()
-
isClosed
public boolean isClosed()
-
-