StatementDecoratorInterceptor.StatementProxy (Apache Tomcat 8.5.94 API Documentation)

Package org.apache.tomcat.jdbc.pool.interceptor

## Class StatementDecoratorInterceptor.StatementProxy<T extends java.sql.Statement>

- java.lang.Object
- - org.apache.tomcat.jdbc.pool.interceptor.StatementDecoratorInterceptor.StatementProxy<T>

- All Implemented Interfaces:
    `java.lang.reflect.InvocationHandler`
  Direct Known Subclasses:
    `StatementCache.CachedStatement`
  Enclosing class:
    StatementDecoratorInterceptor

      protected class StatementDecoratorInterceptor.StatementProxy<T extends java.sql.Statement>
      extends java.lang.Object
      implements java.lang.reflect.InvocationHandler

  Class to measure query execute time.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected boolean` | `closed` |
    `protected T` | `delegate` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `StatementProxy​(T delegate, java.lang.String sql)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `closeInvoked()` |
    `java.lang.Object` | `getActualProxy()` |
    `java.lang.Object` | `getConnection()` |
    `java.lang.reflect.Constructor<?>` | `getConstructor()` |
    `T` | `getDelegate()` |
    `java.lang.String` | `getSql()` |
    `java.lang.Object` | `invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)` |
    `void` | `setActualProxy​(java.lang.Object proxy)` |
    `void` | `setConnection​(java.lang.Object proxy)` |
    `void` | `setConstructor​(java.lang.reflect.Constructor<?> constructor)` |
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### closed

          protected boolean closed

    - #### delegate

          protected T extends java.sql.Statement delegate

  - ### Constructor Detail

    - #### StatementProxy

          public StatementProxy​(T delegate,
                                java.lang.String sql)

  - ### Method Detail

    - #### getDelegate

          public T getDelegate()

    - #### getSql

          public java.lang.String getSql()

    - #### setConnection

          public void setConnection​(java.lang.Object proxy)

    - #### getConnection

          public java.lang.Object getConnection()

    - #### setActualProxy

          public void setActualProxy​(java.lang.Object proxy)

    - #### getActualProxy

          public java.lang.Object getActualProxy()

    - #### getConstructor

          public java.lang.reflect.Constructor<?> getConstructor()

    - #### setConstructor

          public void setConstructor​(java.lang.reflect.Constructor<?> constructor)

    - #### closeInvoked

          public void closeInvoked()

    - #### invoke

          public java.lang.Object invoke​(java.lang.Object proxy,
                                         java.lang.reflect.Method method,
                                         java.lang.Object[] args)
                                  throws java.lang.Throwable

      Specified by:
        `invoke` in interface `java.lang.reflect.InvocationHandler`
      Throws:
        `java.lang.Throwable`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`