|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProxyFactory
Allows us to implement different versions of Proxies
| Method Summary | |
|---|---|
InvocationHandler |
getInvocationHandler(Object proxy)
Returns the invocation handler for the specified proxy instance. |
Class |
getProxyClass(Class interfce)
Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces. |
Class |
getProxyClass(Class[] interfaces)
Returns the java.lang.Class object for a proxy class given a class loader and an array of interfaces. |
void |
init(Properties props)
Prepares the ProxyFactory for use. |
boolean |
isProxyClass(Class cl)
Returns true if and only if the specified class was dynamically generated to be a proxy class using the getProxyClass method or the newProxyInstance method. |
Object |
newProxyInstance(Class proxyClass)
Returns a new proxy instance from the specified proxy class. |
Object |
newProxyInstance(Class[] interfaces,
InvocationHandler h)
Returns an instance of a proxy class for the specified interface that dispatches method invocations to the specified invocation handler. |
Object |
newProxyInstance(Class interfce,
InvocationHandler h)
Returns an instance of a proxy class for the specified interface that dispatches method invocations to the specified invocation handler. |
Object |
setInvocationHandler(Object proxy,
InvocationHandler handler)
Sets the invocation handler for the specified proxy instance. |
| Method Detail |
|---|
void init(Properties props)
props -
InvocationHandler getInvocationHandler(Object proxy)
throws IllegalArgumentException
IllegalArgumentException
Object setInvocationHandler(Object proxy,
InvocationHandler handler)
throws IllegalArgumentException
IllegalArgumentException
Class getProxyClass(Class interfce)
throws IllegalArgumentException
interfce -
IllegalArgumentException
Class getProxyClass(Class[] interfaces)
throws IllegalArgumentException
interfaces -
IllegalArgumentExceptionboolean isProxyClass(Class cl)
cl -
Object newProxyInstance(Class interfce,
InvocationHandler h)
throws IllegalArgumentException
interfce - h -
IllegalArgumentException
Object newProxyInstance(Class[] interfaces,
InvocationHandler h)
throws IllegalArgumentException
interfaces - h -
IllegalArgumentException
Object newProxyInstance(Class proxyClass)
throws IllegalArgumentException
proxyClass -
IllegalArgumentException - Occurs when the specified class is not a proxy class.
IllegalArgumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||