D
- P
- public class ConnectionInvocationHandler<Z,D extends Database<Z>,P> extends ChildInvocationHandler<Z,D,P,SQLException,Connection,SQLException,ConnectionProxyFactory<Z,D,P>>
logger
Constructor and Description |
---|
ConnectionInvocationHandler(ConnectionProxyFactory<Z,D,P> proxyFactory)
Constructs a new ConnectionInvocationHandler
|
Modifier and Type | Method and Description |
---|---|
protected InvocationStrategy |
getInvocationStrategy(Connection connection,
Method method,
Object... parameters)
Returns the appropriate
InvocationStrategy for the specified method. |
protected <R> Invoker<Z,D,Connection,R,SQLException> |
getInvoker(Connection connection,
Method method,
Object... parameters)
Return the appropriate invoker for the specified method.
|
protected ProxyFactoryFactory<Z,D,Connection,SQLException,?,? extends Exception> |
getProxyFactoryFactory(Connection connection,
Method method,
Object... parameters) |
protected <R> void |
postInvoke(Invoker<Z,D,Connection,R,SQLException> invoker,
Connection proxy,
Method method,
Object... parameters) |
invoke
getInvoker, getProxyFactory
public ConnectionInvocationHandler(ConnectionProxyFactory<Z,D,P> proxyFactory)
proxyFactory
- a factory for creating connection proxiesprotected ProxyFactoryFactory<Z,D,Connection,SQLException,?,? extends Exception> getProxyFactoryFactory(Connection connection, Method method, Object... parameters) throws SQLException
getProxyFactoryFactory
in class AbstractInvocationHandler<Z,D extends Database<Z>,Connection,SQLException,ConnectionProxyFactory<Z,D extends Database<Z>,P>>
SQLException
protected InvocationStrategy getInvocationStrategy(Connection connection, Method method, Object... parameters) throws SQLException
InvocationStrategy
for the specified method.
This implementation detects Wrapper
methods; and Object.equals(java.lang.Object)
, Object.hashCode()
, and Object.toString()
.
Default invocation strategy is AllResultsCollector
.getInvocationStrategy
in class AbstractInvocationHandler<Z,D extends Database<Z>,Connection,SQLException,ConnectionProxyFactory<Z,D extends Database<Z>,P>>
connection
- the proxied objectmethod
- the method to invokeparameters
- the method invocation parametersSQLException
protected <R> Invoker<Z,D,Connection,R,SQLException> getInvoker(Connection connection, Method method, Object... parameters) throws SQLException
getInvoker
in class AbstractInvocationHandler<Z,D extends Database<Z>,Connection,SQLException,ConnectionProxyFactory<Z,D extends Database<Z>,P>>
SQLException
protected <R> void postInvoke(Invoker<Z,D,Connection,R,SQLException> invoker, Connection proxy, Method method, Object... parameters)
postInvoke
in class AbstractInvocationHandler<Z,D extends Database<Z>,Connection,SQLException,ConnectionProxyFactory<Z,D extends Database<Z>,P>>
Copyright © 2004–2014 Paul Ferraro. All rights reserved.