|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MethodInterceptor
Method interceptor.
A class implementing this interface is able to be notified of method invocations (
i.e. entries, exits, and errors).
The listener needs to be register on the instance manager with the
InstanceManager.register(org.apache.felix.ipojo.parser.MethodMetadata, MethodInterceptor)
method.
Events are sent before the method entry (onEntry), after the method returns (onExit),
when an error is thrown by the method (onError), and before the after either a returns or an error (onFinally)
| Method Summary | |
|---|---|
void |
onEntry(Object pojo,
Method method,
Object[] args)
This method is called when the execution enters in a method. |
void |
onError(Object pojo,
Method method,
Throwable throwable)
This method is called when the execution throws an exception in the given method. |
void |
onExit(Object pojo,
Method method,
Object returnedObj)
This method is called when the execution exits a method : before a return. |
void |
onFinally(Object pojo,
Method method)
This method is called when the execution of a method is going to terminate : just before to throw an exception or before to return. |
| Method Detail |
|---|
void onEntry(Object pojo,
Method method,
Object[] args)
pojo - the pojo on which the method is called.method - the invoked method.args - the arguments array.
void onExit(Object pojo,
Method method,
Object returnedObj)
return.
If the given returned object is null, either the method is
void, or it returns null.
You must not modified the returned object.
pojo - the pojo on which the method exits.method - the exiting method.returnedObj - the the returned object (boxed for primitive type)
void onError(Object pojo,
Method method,
Throwable throwable)
pojo - the pojo on which the method was accessed.method - the invoked method.throwable - the thrown exception
void onFinally(Object pojo,
Method method)
pojo - the pojo on which the method was accessed.method - the invoked method.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||