Implement this interface and pass a reference of this implementation to n-cube's adviceHandler() API, and n-cube will call the handler before and after each expression or method.
Type Params | Return Type | Name and description |
---|---|---|
|
void |
after(java.lang.reflect.Method method, NCube ncube, java.util.Map input, java.util.Map output, java.lang.Object returnValue, java.lang.Throwable t) This method is called after a n-cube expression or controller method is called. |
|
boolean |
before(java.lang.reflect.Method method, NCube ncube, java.util.Map input, java.util.Map output) This method is called before an n-cube expression or controller method is called. |
|
java.lang.String |
getName() What is the name of this advice? |
This method is called after a n-cube expression or controller method is called. This is only used if the 'advice' handler is set on n-cube.
method
- Method being calledncube
- NCube that this advice is being called frominput
- Map containing the 'input' coordinate to getCell() type APIsoutput
- Map containing the 'output' coordinate to getCell() type APIsreturnValue
- Object return value of the method that was called.This method is called before an n-cube expression or controller method is called. This is only used if the 'advice' handler is set on n-cube.
method
- Method being calledncube
- NCube that this advice is being called frominput
- Map containing the 'input' coordinate to getCell() type APIsoutput
- Map containing the 'output' coordinate to getCell() type APIsWhat is the name of this advice? "log", "perf", etc. Names can be whatever you want.