Package com.amazonaws.xray.sql.postgres
Class TracingInterceptor
- java.lang.Object
-
- org.apache.tomcat.jdbc.pool.JdbcInterceptor
-
- com.amazonaws.xray.sql.postgres.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
-
Constructor Summary
Constructors Constructor Description TracingInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods 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 existjava.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)
-
-
-
Field Detail
-
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.
-
-
Method Detail
-
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 constructorclazz
- 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 interfacejava.lang.reflect.InvocationHandler
- Overrides:
invoke
in classorg.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 classorg.apache.tomcat.jdbc.pool.JdbcInterceptor
-
-