public class DisposableConnectionFacade extends JdbcInterceptor
PooledConnection
. The ProxyCutOffConnection intercepts
two methods:
Connection.close()
- returns the connection to the
pool then breaks the link between cutoff and the next interceptor.
May be called multiple times.Object.toString()
- returns a custom string for this
objectPoolConfiguration.setUseEquals(boolean)
has been called with a
true
argument.CLOSE_VAL, EQUALS_VAL, GETCONNECTION_VAL, HASHCODE_VAL, ISCLOSED_VAL, ISVALID_VAL, ISWRAPPERFOR_VAL, properties, TOSTRING_VAL, UNWRAP_VAL
Modifier | Constructor and Description |
---|---|
protected |
DisposableConnectionFacade(JdbcInterceptor interceptor) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
Object |
invoke(Object proxy,
Method method,
Object[] args)
Gets invoked each time an operation on
Connection is invoked. |
void |
reset(ConnectionPool parent,
PooledConnection con)
Gets called each time the connection is borrowed from the pool
This means that if an interceptor holds a reference to the connection
the interceptor can be reused for another connection.
|
compare, compare, disconnected, getNext, getProperties, isUseEquals, poolClosed, poolStarted, setNext, setProperties, setUseEquals
protected DisposableConnectionFacade(JdbcInterceptor interceptor)
public void reset(ConnectionPool parent, PooledConnection con)
JdbcInterceptor
reset
in class JdbcInterceptor
parent
- - the connection pool owning the connectioncon
- - the pooled connectionpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable
JdbcInterceptor
Connection
is invoked.
invoke
in interface InvocationHandler
invoke
in class JdbcInterceptor
Throwable
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.