|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.inxar.hotswap.ProxyInvocationHandler
The standard InvocationHandler
implementation.
Subclasses can override the preInvoke
,
postInvoke
, or invoke
methods to provide
custom behavior. The current implementation looks like:
| |
|
To use your custom ProxyInvocationHandler
implementation, pass it as the first argument to one of the
ProxyClass.newInstanceH
factory methods:
| |
|
Constructor Summary | |
ProxyInvocationHandler()
|
Method Summary | |
Proxy |
getProxy()
Returns the internal Proxy instance. |
Object |
invoke(Object src,
Method method,
Object[] args)
Implements InvocationHandler . |
void |
postInvoke(Object src,
Method method,
Object[] args,
Object result)
Called after method dispatch to the internal proxy. |
void |
preInvoke(Object src,
Method method,
Object[] args)
Called before method dispatch to the internal proxy. |
void |
setProxy(Proxy proxy)
Sets the internal Proxy to the given instance. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ProxyInvocationHandler()
Method Detail |
public Object invoke(Object src, Method method, Object[] args) throws Throwable
InvocationHandler
.invoke
in interface InvocationHandler
public void setProxy(Proxy proxy)
Proxy
to the given instance.public Proxy getProxy()
Proxy
instance.public void preInvoke(Object src, Method method, Object[] args)
public void postInvoke(Object src, Method method, Object[] args, Object result)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |