Java Doc for StatementInterceptor.java in  » Database-JDBC-Connection-Pool » mysql-connector-java-5.1.3 » com » mysql » jdbc » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database JDBC Connection Pool » mysql connector java 5.1.3 » com.mysql.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.mysql.jdbc.StatementInterceptor

StatementInterceptor
public interface StatementInterceptor (Code)
Implement this interface to be placed "in between" query execution, so that you can influence it. (currently experimental). StatementInterceptors are "chainable" when configured by the user, the results returned by the "current" interceptor will be passed on to the next on in the chain, from left-to-right order, as specified by the user in the JDBC configuration property "statementInterceptors".
version:
   $Id: $




Method Summary
abstract public  booleanexecuteTopLevelOnly()
     Should the driver execute this interceptor only for the "original" top-level query, and not put it in the execution path for queries that may be executed from other interceptors? If an interceptor issues queries using the connection it was created for, and does not return true for this method, it must ensure that it does not cause infinite recursion.
abstract public  voidinit(Connection conn, Properties props)
     Called once per connection that wants to use the interceptor The properties are the same ones passed in in the URL or arguments to Driver.connect() or DriverManager.getConnection().
Parameters:
  conn - the connection for which this interceptor is being created
Parameters:
  props - configuration values as passed to the connection.
abstract public  ResultSetInternalMethodspostProcess(String sql, Statement interceptedStatement, ResultSetInternalMethods originalResultSet, Connection connection)
     Called after the given statement has been sent to the server for processing. Interceptors are free to inspect the "original" result set, and if a different result set is returned by the interceptor, it is used in place of the "original" result set.
abstract public  ResultSetInternalMethodspreProcess(String sql, Statement interceptedStatement, Connection connection)
     Called before the given statement is going to be sent to the server for processing.



Method Detail
executeTopLevelOnly
abstract public boolean executeTopLevelOnly()(Code)
Should the driver execute this interceptor only for the "original" top-level query, and not put it in the execution path for queries that may be executed from other interceptors? If an interceptor issues queries using the connection it was created for, and does not return true for this method, it must ensure that it does not cause infinite recursion. true if the driver should ensure that this interceptor is onlyexecuted for the top-level "original" query.



init
abstract public void init(Connection conn, Properties props) throws SQLException(Code)
Called once per connection that wants to use the interceptor The properties are the same ones passed in in the URL or arguments to Driver.connect() or DriverManager.getConnection().
Parameters:
  conn - the connection for which this interceptor is being created
Parameters:
  props - configuration values as passed to the connection. Note thatin order to support javax.sql.DataSources, configuration properties specificto an interceptor must be passed via setURL() on theDataSource. StatementInterceptor properties are not exposed via accessor/mutator methods on DataSources.
throws:
  SQLException - should be thrown if the the StatementInterceptorcan not initialize itself.



postProcess
abstract public ResultSetInternalMethods postProcess(String sql, Statement interceptedStatement, ResultSetInternalMethods originalResultSet, Connection connection) throws SQLException(Code)
Called after the given statement has been sent to the server for processing. Interceptors are free to inspect the "original" result set, and if a different result set is returned by the interceptor, it is used in place of the "original" result set. (the result set returned by the interceptor must implement the interface com.mysql.jdbc.ResultSetInternalMethods). This method will be called while the connection-level mutex is held, so it will only be called from one thread at a time.
Parameters:
  sql - the SQL representation of the statement
Parameters:
  interceptedStatement - the actual statement instance being intercepted
Parameters:
  connection - the connection the statement is using (passed in to makethread-safe implementations straightforward) a result set that should be returned to the application insteadof results that are created from actual execution of the intercepted statement.
throws:
  SQLException - if an error occurs during execution
See Also:   com.mysql.jdbc.ResultSetInternalMethods



preProcess
abstract public ResultSetInternalMethods preProcess(String sql, Statement interceptedStatement, Connection connection) throws SQLException(Code)
Called before the given statement is going to be sent to the server for processing. Interceptors are free to return a result set (which must implement the interface com.mysql.jdbc.ResultSetInternalMethods), and if so, the server will not execute the query, and the given result set will be returned to the application instead. This method will be called while the connection-level mutex is held, so it will only be called from one thread at a time.
Parameters:
  sql - the SQL representation of the statement
Parameters:
  interceptedStatement - the actual statement instance being intercepted
Parameters:
  connection - the connection the statement is using (passed in to makethread-safe implementations straightforward) a result set that should be returned to the application insteadof results that are created from actual execution of the intercepted statement.
throws:
  SQLException - if an error occurs during execution
See Also:   com.mysql.jdbc.ResultSetInternalMethods



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.