public class JdkProxyFactory extends AbstractProxyFactory
ProxyFactory
implementation that uses Proxy
proxies.Constructor and Description |
---|
JdkProxyFactory() |
Modifier and Type | Method and Description |
---|---|
<T> T |
createDelegatorProxy(ClassLoader classLoader,
ObjectProvider<?> delegateProvider,
Class<?>... proxyClasses)
Creates a proxy2 which delegates to the object provided by
delegateProvider . |
<T> T |
createInterceptorProxy(ClassLoader classLoader,
Object target,
Interceptor interceptor,
Class<?>... proxyClasses)
Creates a proxy2 which passes through a
interceptor before eventually reaching the
target object. |
<T> T |
createInvokerProxy(ClassLoader classLoader,
Invoker invoker,
Class<?>... proxyClasses)
Creates a proxy2 which uses the provided
Invoker to handle all method invocations. |
canProxy, createDelegatorProxy, createInterceptorProxy, createInvokerProxy
public JdkProxyFactory()
public <T> T createDelegatorProxy(ClassLoader classLoader, ObjectProvider<?> delegateProvider, Class<?>... proxyClasses)
delegateProvider
.classLoader
- the class loader to use when generating the proxy2delegateProvider
- the delegate providerproxyClasses
- the interfaces that the proxy2 should implementdelegateProvider>
public <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 proxy2target
- the target objectinterceptor
- the method interceptorproxyClasses
- the interfaces that the proxy2 should implement.interceptor
before eventually reaching the
target
object.public <T> T createInvokerProxy(ClassLoader classLoader, Invoker invoker, Class<?>... proxyClasses)
Invoker
to handle all method invocations.classLoader
- the class loader to use when generating the proxy2invoker
- the invokerproxyClasses
- the interfaces that the proxy2 should implementInvoker
to handle all method invocationsCopyright © 2005–2014 The Apache Software Foundation. All rights reserved.