public class ProxyFactory extends Object
Proxy
,
InvocationHandler
Modifier | Constructor and Description |
---|---|
protected |
ProxyFactory()
Protected constructor for ProxyFactory subclasses to use.
|
Modifier and Type | Method and Description |
---|---|
CallableStatement |
createCallableStatement(InvocationHandler handler)
Creates a new proxy
CallableStatement object. |
Connection |
createConnection(InvocationHandler handler)
Creates a new proxy
Connection object. |
Driver |
createDriver(InvocationHandler handler)
Creates a new proxy
Driver object. |
PreparedStatement |
createPreparedStatement(InvocationHandler handler)
Creates a new proxy
PreparedStatement object. |
ResultSet |
createResultSet(InvocationHandler handler)
Creates a new proxy
ResultSet object. |
ResultSetMetaData |
createResultSetMetaData(InvocationHandler handler)
Creates a new proxy
ResultSetMetaData object. |
Statement |
createStatement(InvocationHandler handler)
Creates a new proxy
Statement object. |
static ProxyFactory |
instance()
Returns the Singleton instance of this class.
|
<T> T |
newProxyInstance(Class<T> type,
InvocationHandler handler)
Convenience method to generate a single-interface proxy using the handler's classloader
|
protected ProxyFactory()
public static ProxyFactory instance()
public CallableStatement createCallableStatement(InvocationHandler handler)
CallableStatement
object.handler
- The handler that intercepts/overrides method calls.public Connection createConnection(InvocationHandler handler)
Connection
object.handler
- The handler that intercepts/overrides method calls.public Driver createDriver(InvocationHandler handler)
Driver
object.handler
- The handler that intercepts/overrides method calls.public PreparedStatement createPreparedStatement(InvocationHandler handler)
PreparedStatement
object.handler
- The handler that intercepts/overrides method calls.public ResultSet createResultSet(InvocationHandler handler)
ResultSet
object.handler
- The handler that intercepts/overrides method calls.public ResultSetMetaData createResultSetMetaData(InvocationHandler handler)
ResultSetMetaData
object.handler
- The handler that intercepts/overrides method calls.public Statement createStatement(InvocationHandler handler)
Statement
object.handler
- The handler that intercepts/overrides method calls.public <T> T newProxyInstance(Class<T> type, InvocationHandler handler)
T
- The type of object to proxytype
- The type of object to proxyhandler
- The handler that intercepts/overrides method calls.Copyright © 2002–2023 The Apache Software Foundation. All rights reserved.