public abstract class AbstractProxyFactory extends Object implements ProxyFactory
ProxyFactory implementation, primarily providing implementations of the interface methods that
are typically convenience constructs over the other methods.| Constructor and Description |
|---|
AbstractProxyFactory() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProxy(Class<?>... proxyClasses)
Returns true if all
proxyClasses are interfaces. |
<T> T |
createDelegatorProxy(ObjectProvider<?> delegateProvider,
Class<?>... proxyClasses)
Creates a proxy which delegates to the object provided by
delegateProvider. |
<T> T |
createInterceptorProxy(Object target,
Interceptor interceptor,
Class<?>... proxyClasses)
Creates a proxy which passes through a
interceptor before eventually reaching the
target object. |
<T> T |
createInvokerProxy(Invoker invoker,
Class<?>... proxyClasses)
Creates a proxy which uses the provided
Invoker to handle all method invocations. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateDelegatorProxy, createInterceptorProxy, createInvokerProxypublic AbstractProxyFactory()
public boolean canProxy(Class<?>... proxyClasses)
proxyClasses are interfaces.canProxy in interface ProxyFactoryproxyClasses - the proxy classesproxyClasses are interfacespublic <T> T createDelegatorProxy(ObjectProvider<?> delegateProvider, Class<?>... proxyClasses)
delegateProvider. The proxy will be
generated using the current thread's "context class loader."createDelegatorProxy in interface ProxyFactorydelegateProvider - the delegate providerproxyClasses - the interfaces that the proxy should implementpublic <T> T createInterceptorProxy(Object target, Interceptor interceptor, Class<?>... proxyClasses)
interceptor before eventually reaching the
target object. The proxy will be generated using the current thread's "context class loader."createInterceptorProxy in interface ProxyFactorytarget - the target objectinterceptor - the method interceptorproxyClasses - the interfaces that the proxy should implementinterceptor before eventually reaching the
target object.public <T> T createInvokerProxy(Invoker invoker, Class<?>... proxyClasses)
Invoker to handle all method invocations. The proxy will be
generated using the current thread's "context class loader."createInvokerProxy in interface ProxyFactoryinvoker - the invokerproxyClasses - the interfaces that the proxy should implementInvoker to handle all method invocationsCopyright © 2005–2014 The Apache Software Foundation. All rights reserved.