Package hudson.util
Interface InvocationInterceptor
-
public interface InvocationInterceptorInterceptor aroundInvocationHandler.- Since:
- 1.232
- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Objectinvoke(Object proxy, Method method, Object[] args, InvocationHandler delegate)This method can intercept the invocation ofInvocationHandlereither before or after the invocation happens.
-
-
-
Method Detail
-
invoke
Object invoke(Object proxy, Method method, Object[] args, InvocationHandler delegate) throws Throwable
This method can intercept the invocation ofInvocationHandlereither before or after the invocation happens.The general coding pattern is:
Object invoke(Object proxy, Method method, Object[] args, InvocationHandler delegate) { ... do pre-invocation work ... ret = delegate.invoke(proxy,method,args); ... do post-invocation work ... return ret; }But the implementation may choose to skip calling the 'delegate' object, alter arguments, and alter the return value.
- Throws:
Throwable
-
-