|
Apache Tomcat 7.0.25 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tomcat.jdbc.pool.JdbcInterceptor
org.apache.tomcat.jdbc.pool.interceptor.AbstractCreateStatementInterceptor
public abstract class AbstractCreateStatementInterceptor
Abstraction interceptor. This component intercepts all calls to create some type of SQL statement.
By extending this class, one can intercept queries and update statements by overriding the createStatement(Object, Method, Object[], Object, long)
method.
| Field Summary | |
|---|---|
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
|
| Fields inherited from class org.apache.tomcat.jdbc.pool.JdbcInterceptor |
|---|
CLOSE_VAL, GETCONNECTION_VAL, ISCLOSED_VAL, ISWRAPPERFOR_VAL, properties, TOSTRING_VAL, UNWRAP_VAL |
| Constructor Summary | |
|---|---|
AbstractCreateStatementInterceptor()
|
|
| Method Summary | |
|---|---|
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. |
Object |
invoke(Object proxy,
Method method,
Object[] args)
Gets invoked each time an operation on Connection is 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. |
| 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 Detail |
|---|
protected 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
| Constructor Detail |
|---|
public AbstractCreateStatementInterceptor()
| Method Detail |
|---|
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
Connection is invoked.
invoke in interface InvocationHandlerinvoke in class JdbcInterceptorThrowable
public abstract Object createStatement(Object proxy,
Method method,
Object[] args,
Object statement,
long time)
Statement, PreparedStatement or CallableStatement
proxy - 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 created
Statement 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 recursion
protected boolean isExecute(Method method,
boolean process)
method - the method being invoked on the proxyprocess - boolean result used for recursion
protected boolean process(String[] names,
Method method,
boolean process)
public void reset(ConnectionPool parent,
PooledConnection con)
reset in class JdbcInterceptorparent - - the connection pool owning the connectioncon - - the pooled connection
|
Apache Tomcat 7.0.25 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||