Class StatementDecoratorInterceptor.StatementProxy<T extends Statement>
java.lang.Object
org.apache.tomcat.jdbc.pool.interceptor.StatementDecoratorInterceptor.StatementProxy<T>
- Type Parameters:
T- The type of Statement being proxied.
- All Implemented Interfaces:
InvocationHandler
- Direct Known Subclasses:
StatementCache.CachedStatement
- Enclosing class:
StatementDecoratorInterceptor
protected class StatementDecoratorInterceptor.StatementProxy<T extends Statement>
extends Object
implements InvocationHandler
Class to measure query execute time.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the close method is invoked on the statement.Returns the actual proxy object.Returns the connection proxy.Constructor<?> Returns the constructor used to create this proxy.Returns the delegated statement.getSql()Returns the SQL text.voidsetActualProxy(Object proxy) Sets the actual proxy object.voidsetConnection(Object proxy) Sets the connection proxy.voidsetConstructor(Constructor<?> constructor) Sets the constructor for creating proxies.toString()
-
Field Details
-
closed
protected boolean closedIndicates whether this statement has been closed. -
delegate
The delegated statement.
-
-
Constructor Details
-
StatementProxy
Constructs a StatementProxy.- Parameters:
delegate- the statement to delegate tosql- the SQL text
-
-
Method Details
-
getDelegate
Returns the delegated statement.- Returns:
- the delegated statement
-
getSql
Returns the SQL text.- Returns:
- the SQL text
-
setConnection
Sets the connection proxy.- Parameters:
proxy- the connection proxy
-
getConnection
Returns the connection proxy.- Returns:
- the connection proxy
-
setActualProxy
Sets the actual proxy object.- Parameters:
proxy- the actual proxy
-
getActualProxy
Returns the actual proxy object.- Returns:
- the actual proxy
-
getConstructor
Returns the constructor used to create this proxy.- Returns:
- the constructor
-
setConstructor
Sets the constructor for creating proxies.- Parameters:
constructor- the constructor
-
closeInvoked
public void closeInvoked()Called when the close method is invoked on the statement. -
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
toString
-