public class HotSwappingInvoker<T> extends DelegatingInvoker<Object>
DelegatingInvoker implementation that allows the exchange of the delegate.| Modifier and Type | Class and Description |
|---|---|
protected static interface |
HotSwappingInvoker.CycleCheck
Internal interface used to detect cyclic swapping activity.
|
| Constructor and Description |
|---|
HotSwappingInvoker(Class<?>[] types,
ProxyFactory proxyFactory,
ObjectReference<Object> delegateReference,
DelegationMode delegationMode)
Construct a HotSwappingInvoker.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
delegate()
Retrieve the delegated object in derived classes.
|
protected Object |
hotswap(Object newDelegate)
Exchange the current delegate.
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
Invocation of a method of the proxied object.
|
T |
proxy()
Create a proxy for this Invoker.
|
equals, getDelegateReference, getMethodToInvoke, getProxyFactory, hashCode, invokeOnDelegatepublic HotSwappingInvoker(Class<?>[] types, ProxyFactory proxyFactory, ObjectReference<Object> delegateReference, DelegationMode delegationMode)
types - the types of the proxyproxyFactory - the ProxyFactory to usedelegateReference - the ObjectReference with the delegatedelegationMode - DelegationMode.DIRECT or DelegationMode.SIGNATUREpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable
Invokerprotected Object delegate()
DelegatingInvokerdelegate in class DelegatingInvoker<Object>protected Object hotswap(Object newDelegate)
newDelegate - the new delegateIllegalStateException - if cyclic swapping action is detectedCopyright © 2005–2018 Codehaus. All rights reserved.