Class TracingInterceptor

java.lang.Object
org.apache.tomcat.jdbc.pool.JdbcInterceptor
com.amazonaws.xray.sql.mysql.TracingInterceptor
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class TracingInterceptor
extends org.apache.tomcat.jdbc.pool.JdbcInterceptor
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    protected class  TracingInterceptor.TracingStatementProxy  
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected static java.lang.reflect.Constructor<?>[] constructors
    Deprecated.
    For internal use only.
    protected static java.lang.String CREATE_STATEMENT  
    protected static int CREATE_STATEMENT_INDEX  
    protected static java.lang.String EXECUTE  
    protected static java.lang.String EXECUTE_BATCH  
    protected static java.lang.String EXECUTE_QUERY  
    protected static java.lang.String[] EXECUTE_TYPES  
    protected static java.lang.String EXECUTE_UPDATE  
    protected static java.lang.String PREPARE_CALL  
    protected static int PREPARE_CALL_INDEX  
    protected static java.lang.String PREPARE_STATEMENT  
    protected static int PREPARE_STATEMENT_INDEX  
    protected static int STATEMENT_TYPE_COUNT  
    protected static java.lang.String[] STATEMENT_TYPES  

    Fields inherited from class org.apache.tomcat.jdbc.pool.JdbcInterceptor

    CLOSE_VAL, EQUALS_VAL, GETCONNECTION_VAL, HASHCODE_VAL, ISCLOSED_VAL, ISVALID_VAL, ISWRAPPERFOR_VAL, properties, TOSTRING_VAL, UNWRAP_VAL
  • Constructor Summary

    Constructors
    Constructor Description
    TracingInterceptor()  
  • Method Summary

    Modifier and Type Method Description
    java.lang.Object createStatement​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object statementObject)  
    protected java.lang.reflect.Constructor<?> getConstructor​(int index, java.lang.Class<?> clazz)
    Creates a constructor for a proxy class, if one doesn't already exist
    java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
    protected boolean isMemberOf​(java.lang.String[] names, java.lang.reflect.Method method)  
    void reset​(org.apache.tomcat.jdbc.pool.ConnectionPool parent, org.apache.tomcat.jdbc.pool.PooledConnection con)  

    Methods inherited from class org.apache.tomcat.jdbc.pool.JdbcInterceptor

    compare, compare, disconnected, getNext, getProperties, isUseEquals, poolClosed, poolStarted, setNext, setProperties, setUseEquals

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • CREATE_STATEMENT

      protected static final java.lang.String CREATE_STATEMENT
      See Also:
      Constant Field Values
    • CREATE_STATEMENT_INDEX

      protected static final int CREATE_STATEMENT_INDEX
      See Also:
      Constant Field Values
    • PREPARE_STATEMENT

      protected static final java.lang.String PREPARE_STATEMENT
      See Also:
      Constant Field Values
    • PREPARE_STATEMENT_INDEX

      protected static final int PREPARE_STATEMENT_INDEX
      See Also:
      Constant Field Values
    • PREPARE_CALL

      protected static final java.lang.String PREPARE_CALL
      See Also:
      Constant Field Values
    • PREPARE_CALL_INDEX

      protected static final int PREPARE_CALL_INDEX
      See Also:
      Constant Field Values
    • STATEMENT_TYPES

      protected static final java.lang.String[] STATEMENT_TYPES
    • STATEMENT_TYPE_COUNT

      protected static final int STATEMENT_TYPE_COUNT
    • EXECUTE

      protected static final java.lang.String EXECUTE
      See Also:
      Constant Field Values
    • EXECUTE_QUERY

      protected static final java.lang.String EXECUTE_QUERY
      See Also:
      Constant Field Values
    • EXECUTE_UPDATE

      protected static final java.lang.String EXECUTE_UPDATE
      See Also:
      Constant Field Values
    • EXECUTE_BATCH

      protected static final java.lang.String EXECUTE_BATCH
      See Also:
      Constant Field Values
    • EXECUTE_TYPES

      protected static final java.lang.String[] EXECUTE_TYPES
    • constructors

      @Deprecated protected static final java.lang.reflect.Constructor<?>[] constructors
      Deprecated.
      For internal use only.
  • Constructor Details

    • TracingInterceptor

      public TracingInterceptor()
  • Method Details

    • getConstructor

      protected java.lang.reflect.Constructor<?> getConstructor​(int index, java.lang.Class<?> clazz) throws java.lang.NoSuchMethodException
      Creates a constructor for a proxy class, if one doesn't already exist
      Parameters:
      index - - the index of the constructor
      clazz - - the interface that the proxy will implement
      Returns:
      - returns a constructor used to create new instances
      Throws:
      java.lang.NoSuchMethodException
    • createStatement

      public java.lang.Object createStatement​(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object statementObject)
    • 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
      Overrides:
      invoke in class org.apache.tomcat.jdbc.pool.JdbcInterceptor
      Throws:
      java.lang.Throwable
    • isMemberOf

      protected boolean isMemberOf​(java.lang.String[] names, java.lang.reflect.Method method)
    • reset

      public void reset​(org.apache.tomcat.jdbc.pool.ConnectionPool parent, org.apache.tomcat.jdbc.pool.PooledConnection con)
      Specified by:
      reset in class org.apache.tomcat.jdbc.pool.JdbcInterceptor