public class GrapheneProxyHandler extends Object implements net.sf.cglib.proxy.MethodInterceptor, InvocationHandler
Invocation handler which wraps the given target for invocation (as the target instance for future computation of target).
This handlers determines whenever the result of invocation can be proxied and if yes, it recursively wraps it with proxy using this invocation handler.
| Modifier and Type | Method and Description |
|---|---|
static GrapheneProxyHandler |
forFuture(GrapheneProxy.FutureTarget future)
Returns invocation handler which wraps the target for future computation.
|
static GrapheneProxyHandler |
forTarget(Object target)
Returns invocation handler which wraps the given target instance.
|
Object |
intercept(Object obj,
Method method,
Object[] args,
net.sf.cglib.proxy.MethodProxy proxy)
Delegates to
invoke(Object, Method, Object[]) to serve as MethodInterceptor. |
Object |
invoke(Object proxy,
Method method,
Object[] args)
End point for handling invocations on proxy.
|
void |
resetInterceptors()
Resets the interceptors
|
public static GrapheneProxyHandler forTarget(Object target)
target - the target of invocationpublic static GrapheneProxyHandler forFuture(GrapheneProxy.FutureTarget future)
future - the future targetpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable
End point for handling invocations on proxy.
Decides whenever the result of invocation is proxyable and if yes, it returns the proxy using new instance of
GrapheneProxyHandler wrapping the result of invocation.
The method specifically handles GrapheneProxyInstance.unwrap() method which returns the real target for
invocation.
invoke in interface InvocationHandlerThrowablepublic Object intercept(Object obj, Method method, Object[] args, net.sf.cglib.proxy.MethodProxy proxy) throws Throwable
invoke(Object, Method, Object[]) to serve as MethodInterceptor.intercept in interface net.sf.cglib.proxy.MethodInterceptorThrowablepublic void resetInterceptors()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.