public class ProxyFactory
extends java.lang.Object
Proxy
,
InvocationHandler
Modifier and Type | Field and Description |
---|---|
private static java.lang.Class[] |
callableStatementClass
Class[] for CallableStatement interface.
|
private static java.lang.Class[] |
connectionClass
Class[] for Connection interface.
|
private static java.lang.Class[] |
driverClass
Class[] for Driver interface.
|
private static ProxyFactory |
instance
The Singleton instance of this class.
|
private static java.lang.Class[] |
metaClass
Class[] for ResultSetMetaData interface.
|
private static java.lang.Class[] |
preparedStatementClass
Class[] for PreparedStatement interface.
|
private static java.lang.Class[] |
resultSetClass
Class[] for ResultSet interface.
|
private static java.lang.Class[] |
statementClass
Class[] for Statement interface.
|
Modifier | Constructor and Description |
---|---|
protected |
ProxyFactory()
Protected constructor for ProxyFactory subclasses to use.
|
Modifier and Type | Method and Description |
---|---|
java.sql.CallableStatement |
createCallableStatement(java.lang.reflect.InvocationHandler handler)
Creates a new proxy
CallableStatement object. |
java.sql.Connection |
createConnection(java.lang.reflect.InvocationHandler handler)
Creates a new proxy
Connection object. |
java.sql.Driver |
createDriver(java.lang.reflect.InvocationHandler handler)
Creates a new proxy
Driver object. |
java.sql.PreparedStatement |
createPreparedStatement(java.lang.reflect.InvocationHandler handler)
Creates a new proxy
PreparedStatement object. |
java.sql.ResultSet |
createResultSet(java.lang.reflect.InvocationHandler handler)
Creates a new proxy
ResultSet object. |
java.sql.ResultSetMetaData |
createResultSetMetaData(java.lang.reflect.InvocationHandler handler)
Creates a new proxy
ResultSetMetaData object. |
java.sql.Statement |
createStatement(java.lang.reflect.InvocationHandler handler)
Creates a new proxy
Statement object. |
static ProxyFactory |
instance()
Returns the Singleton instance of this class.
|
private static final java.lang.Class[] callableStatementClass
private static final java.lang.Class[] connectionClass
private static final java.lang.Class[] driverClass
private static final ProxyFactory instance
private static final java.lang.Class[] metaClass
private static final java.lang.Class[] preparedStatementClass
private static final java.lang.Class[] resultSetClass
private static final java.lang.Class[] statementClass
protected ProxyFactory()
public static ProxyFactory instance()
public java.sql.CallableStatement createCallableStatement(java.lang.reflect.InvocationHandler handler)
CallableStatement
object.handler
- The handler that intercepts/overrides method calls.public java.sql.Connection createConnection(java.lang.reflect.InvocationHandler handler)
Connection
object.handler
- The handler that intercepts/overrides method calls.public java.sql.Driver createDriver(java.lang.reflect.InvocationHandler handler)
Driver
object.handler
- The handler that intercepts/overrides method calls.public java.sql.PreparedStatement createPreparedStatement(java.lang.reflect.InvocationHandler handler)
PreparedStatement
object.handler
- The handler that intercepts/overrides method calls.public java.sql.ResultSet createResultSet(java.lang.reflect.InvocationHandler handler)
ResultSet
object.handler
- The handler that intercepts/overrides method calls.public java.sql.ResultSetMetaData createResultSetMetaData(java.lang.reflect.InvocationHandler handler)
ResultSetMetaData
object.handler
- The handler that intercepts/overrides method calls.public java.sql.Statement createStatement(java.lang.reflect.InvocationHandler handler)
Statement
object.handler
- The handler that intercepts/overrides method calls.