AbstractQueryReport.StatementProxy (Apache Tomcat 11.0.24 API Documentation)
Description: declaration: package: org.apache.tomcat.jdbc.pool.interceptor, class: AbstractQueryReport, class: StatementProxy

# Class AbstractQueryReport.StatementProxy

java.lang.Object
org.apache.tomcat.jdbc.pool.interceptor.AbstractQueryReport.StatementProxy

All Implemented Interfaces:
  `InvocationHandler`

Enclosing class:
  `AbstractQueryReport`

protected class AbstractQueryReport.StatementProxy extends Object implements InvocationHandler
Class to measure query execute time

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected boolean`
  `closed`
  Indicates whether the proxy has been closed.
  `protected Object`
  `delegate`
  The underlying statement or connection being proxied.
  `protected final String`
  `query`
  The SQL query being executed.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StatementProxy(Object parent, String query)`
  Constructs a new `StatementProxy`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `invoke(Object proxy, Method method, Object[] args)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### closed

    protected boolean closed
    Indicates whether the proxy has been closed.

  - ### delegate

    protected Object delegate
    The underlying statement or connection being proxied.

  - ### query

    protected final String query
    The SQL query being executed.

- ## Constructor Details

  - ### StatementProxy

    public StatementProxy(Object parent, String query)
    Constructs a new `StatementProxy`.
    Parameters:
      `parent` - The underlying statement or connection
      `query` - The SQL query being executed

- ## Method Details

  - ### invoke

    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
    Specified by:
      `invoke` in interface `InvocationHandler`
    Throws:
      `Throwable`