public class DisposableConnectionFacade extends JdbcInterceptor
PooledConnection
. The DisposableConnectionFacade 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(java.lang.Object obj) |
int |
hashCode() |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.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 int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
JdbcInterceptor
Connection
is invoked.
invoke
in interface java.lang.reflect.InvocationHandler
invoke
in class JdbcInterceptor
java.lang.Throwable
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.