public class InvocationProxyFactory extends Object
Method calls to invocation proxies can be intercepted and modified by a chain of MethodInterceptors. Each
MethodInterceptor can continue the call chain, terminate prematurely or modify all aspects of a Method
invocation.
InvocationProxyFactory produces invocation proxies which can implement multiple interface type. Any non-interface
types are rejected.
MethodInterceptor,
MethodInvocation| Constructor and Description |
|---|
InvocationProxyFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
addInterceptor(MethodInterceptor interceptor)
Add a
MethodInterceptor to the interceptor chain. |
void |
addInterface(Class<?> ifc)
Add a interface type that should be implemented by the resulting invocation proxy.
|
<T> T |
createProxy(ClassLoader classLoader)
Create a proxy instance give a
ClassLoader. |
public <T> T createProxy(ClassLoader classLoader)
ClassLoader.T - inferred result type.classLoader - must not be null.public void addInterface(Class<?> ifc)
ifc - must not be null and must be an interface type.public void addInterceptor(MethodInterceptor interceptor)
MethodInterceptor to the interceptor chain.interceptor - notNullCopyright © 2019 lettuce.io. All rights reserved.