|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.openmarkup.Interceptor
Interceptor
Constructor Summary | |
Interceptor(Object delegate)
|
Method Summary | |
static Class[] |
getInterceptorClasses()
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
Heart of the interceptor |
protected void |
processAfter(Method meth,
Object result)
Called after a method is invoked. |
protected void |
processBefore(Method meth,
Object[] args)
Called before method is invoked. |
protected abstract void |
processError(Object delegate,
Method meth,
Object[] args,
Throwable ex)
Error handling method. |
static Object |
wrap(Object delegate)
Wrap delegate with default interceptors. |
static Object |
wrap(Object delegate,
Class[] interceptorClasses)
Wrap delegate with explicit interceptors, forming a "chain of responsibility". |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Interceptor(Object delegate)
Method Detail |
public static Class[] getInterceptorClasses()
public static Object wrap(Object delegate)
delegate
-
public static Object wrap(Object delegate, Class[] interceptorClasses)
delegate
- interceptorClasses
-
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
proxy
- method
- args
-
Throwable
protected void processBefore(Method meth, Object[] args)
meth
- args
- protected void processAfter(Method meth, Object result)
meth
- result
- protected abstract void processError(Object delegate, Method meth, Object[] args, Throwable ex) throws Throwable
delegate
- meth
- args
- ex
-
Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |