public interface ProxyFactory
Modifier and Type | Method and Description |
---|---|
boolean |
canProxy(Class<?>... proxyClasses)
Learn whether this
ProxyFactory is capable of creating a proxy for the specified set of classes. |
<T> T |
createDelegatorProxy(ClassLoader classLoader,
ObjectProvider<?> delegateProvider,
Class<?>... proxyClasses)
Creates a proxy which delegates to the object provided by
delegateProvider . |
<T> T |
createDelegatorProxy(ObjectProvider<?> delegateProvider,
Class<?>... proxyClasses)
Creates a proxy which delegates to the object provided by
delegateProvider . |
<T> T |
createInterceptorProxy(ClassLoader classLoader,
Object target,
Interceptor interceptor,
Class<?>... proxyClasses)
Creates a proxy which passes through a
interceptor before eventually reaching the
target object. |
<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(ClassLoader classLoader,
Invoker invoker,
Class<?>... proxyClasses)
Creates a proxy which uses the provided
Invoker to handle all method invocations. |
<T> T |
createInvokerProxy(Invoker invoker,
Class<?>... proxyClasses)
Creates a proxy which uses the provided
Invoker to handle all method invocations. |
boolean canProxy(Class<?>... proxyClasses)
ProxyFactory
is capable of creating a proxy for the specified set of classes.proxyClasses
- the proxy2 classes<T> T createDelegatorProxy(ObjectProvider<?> delegateProvider, Class<?>... proxyClasses)
delegateProvider
. The proxy will be
generated using the current thread's "context class loader."delegateProvider
- the delegate providerproxyClasses
- the interfaces that the proxy should implement<T> T createDelegatorProxy(ClassLoader classLoader, ObjectProvider<?> delegateProvider, Class<?>... proxyClasses)
delegateProvider
.classLoader
- the class loader to use when generating the proxydelegateProvider
- the delegate providerproxyClasses
- the interfaces that the proxy should implementdelegateProvider>
<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."target
- the target objectinterceptor
- the method interceptorproxyClasses
- the interfaces that the proxy should implementinterceptor
before eventually reaching the
target
object.<T> T createInterceptorProxy(ClassLoader classLoader, Object target, Interceptor interceptor, Class<?>... proxyClasses)
interceptor
before eventually reaching the
target
object.classLoader
- the class loader to use when generating the proxytarget
- the target objectinterceptor
- the method interceptorproxyClasses
- the interfaces that the proxy should implement.interceptor
before eventually reaching the
target
object.<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."invoker
- the invokerproxyClasses
- the interfaces that the proxy should implementInvoker
to handle all method invocations<T> T createInvokerProxy(ClassLoader classLoader, Invoker invoker, Class<?>... proxyClasses)
Invoker
to handle all method invocations.classLoader
- the class loader to use when generating the proxyinvoker
- the invokerproxyClasses
- the interfaces that the proxy should implementInvoker
to handle all method invocationsCopyright © 2005–2014 The Apache Software Foundation. All rights reserved.