public abstract class AbstractCreateStatementInterceptor extends JdbcInterceptor
createStatement(Object, Method, Object[], Object, long)
 method.| Modifier and Type | Field and Description | 
|---|---|
| protected static Constructor<?>[] | constructorsthe constructors that are used to create statement proxies | 
| protected static String | CREATE_STATEMENT | 
| protected static int | CREATE_STATEMENT_IDX | 
| protected static String | EXECUTE | 
| protected static String | EXECUTE_BATCH | 
| protected static String | EXECUTE_QUERY | 
| protected static String[] | EXECUTE_TYPES | 
| protected static String | EXECUTE_UPDATE | 
| protected static String | PREPARE_CALL | 
| protected static int | PREPARE_CALL_IDX | 
| protected static String | PREPARE_STATEMENT | 
| protected static int | PREPARE_STATEMENT_IDX | 
| protected static int | STATEMENT_TYPE_COUNT | 
| protected static String[] | STATEMENT_TYPES | 
CLOSE_VAL, EQUALS_VAL, GETCONNECTION_VAL, HASHCODE_VAL, ISCLOSED_VAL, ISVALID_VAL, ISWRAPPERFOR_VAL, properties, TOSTRING_VAL, UNWRAP_VAL| Constructor and Description | 
|---|
| AbstractCreateStatementInterceptor() | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract void | closeInvoked()Method invoked when the operation  Connection.close()is invoked. | 
| abstract Object | createStatement(Object proxy,
               Method method,
               Object[] args,
               Object statement,
               long time)This method will be invoked after a successful statement creation. | 
| protected Constructor<?> | getConstructor(int idx,
              Class<?> clazz)Creates a constructor for a proxy class, if one doesn't already exist | 
| Object | invoke(Object proxy,
      Method method,
      Object[] args)Gets invoked each time an operation on  Connectionis invoked. | 
| protected boolean | isExecute(Method method,
         boolean process)Returns true if the method that is being invoked matches one of the execute types. | 
| protected boolean | isStatement(Method method,
           boolean process)Returns true if the method that is being invoked matches one of the statement types. | 
| protected boolean | process(String[] names,
       Method method,
       boolean process) | 
| void | reset(ConnectionPool parent,
     PooledConnection con)no-op for this interceptor. no state is stored. | 
compare, compare, disconnected, getNext, getProperties, isUseEquals, poolClosed, poolStarted, setNext, setProperties, setUseEqualsprotected static final String CREATE_STATEMENT
protected static final int CREATE_STATEMENT_IDX
protected static final String PREPARE_STATEMENT
protected static final int PREPARE_STATEMENT_IDX
protected static final String PREPARE_CALL
protected static final int PREPARE_CALL_IDX
protected static final String[] STATEMENT_TYPES
protected static final int STATEMENT_TYPE_COUNT
protected static final String EXECUTE
protected static final String EXECUTE_QUERY
protected static final String EXECUTE_UPDATE
protected static final String EXECUTE_BATCH
protected static final String[] EXECUTE_TYPES
protected static final Constructor<?>[] constructors
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
Connection is invoked.
 invoke in interface InvocationHandlerinvoke in class JdbcInterceptorThrowableprotected Constructor<?> getConstructor(int idx, Class<?> clazz) throws NoSuchMethodException
idx - - the index of the constructorclazz - - the interface that the proxy will implementNoSuchMethodException - Constructor not foundpublic abstract Object createStatement(Object proxy, Method method, Object[] args, Object statement, long time)
Statement, PreparedStatement or CallableStatementproxy - the actual proxy objectmethod - the method that was called. It will be one of the methods defined in STATEMENT_TYPESargs - the arguments to the methodstatement - the statement that the underlying connection createdStatement objectpublic abstract void closeInvoked()
Connection.close() is invoked.protected boolean isStatement(Method method, boolean process)
method - the method being invoked on the proxyprocess - boolean result used for recursionprotected boolean isExecute(Method method, boolean process)
method - the method being invoked on the proxyprocess - boolean result used for recursionpublic void reset(ConnectionPool parent, PooledConnection con)
reset in class JdbcInterceptorparent - - the connection pool owning the connectioncon - - the pooled connectionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.