org.gcube.common.core.utils.proxies
Class ForwardProxyContext
java.lang.Object
org.gcube.common.core.utils.proxies.GCUBEProxyContext<ForwardProxyContext.ReturnProxy>
org.gcube.common.core.utils.proxies.ForwardProxyContext
public class ForwardProxyContext
- extends GCUBEProxyContext<ForwardProxyContext.ReturnProxy>
A specialisation of GCUBEProxyContext for proxies which forward proxied calls to other proxies
determined dynamically on the basis of the annotations on the methods of the proxied object.
In particular, a forwarding proxy will forward calls based on the resolution of
primary annotations through a GCUBEProxyFactory. In addition, a forwarding proxy
will react to its own primary annotation ForwardProxyContext.ReturnProxy, by proxying the
return value of a proxied method invocation with another forwarding proxy. Essentially,
this allows annotation-based proxying to propagate deep within class hierarchies.
- Author:
- Fabio Simeoni (University of Strathclyde)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ForwardProxyContext
public ForwardProxyContext()
getInterceptor
public net.sf.cglib.proxy.MethodInterceptor getInterceptor(Object proxied)
- Returns the object which will intercept calls to the proxy.
- Specified by:
getInterceptor in class GCUBEProxyContext<ForwardProxyContext.ReturnProxy>
- Parameters:
proxied - the proxied object.
- Returns:
- the intercepting object.
getAnnotationClass
public Class<ForwardProxyContext.ReturnProxy> getAnnotationClass()
- Returns the class of the primary annotation.
- Specified by:
getAnnotationClass in class GCUBEProxyContext<ForwardProxyContext.ReturnProxy>
- Returns:
- the annotation class.
Copyright © 2013. All Rights Reserved.