public class MultipleInvocationListener extends java.lang.Object implements InvocationListener
InvocationListener
that supports the use
of multiple InvocationListener
s called one after another.Constructor and Description |
---|
MultipleInvocationListener(InvocationListener... invocationListeners)
Creates with the given
InvocationListener s,
addInvocationListener(InvocationListener) can be called to
add additional InvocationListener s. |
Modifier and Type | Method and Description |
---|---|
void |
addInvocationListener(InvocationListener invocationListener)
Adds an
InvocationListener to the end of the
list of invocation listeners. |
void |
didInvoke(java.lang.reflect.Method method,
java.util.List<com.fasterxml.jackson.databind.JsonNode> arguments,
java.lang.Object result,
java.lang.Throwable t,
long duration)
This method will be invoked after a JSON-RPC service has been invoked.
|
void |
willInvoke(java.lang.reflect.Method method,
java.util.List<com.fasterxml.jackson.databind.JsonNode> arguments)
This method will be invoked prior to a JSON-RPC service being invoked.
|
public MultipleInvocationListener(InvocationListener... invocationListeners)
InvocationListener
s,
addInvocationListener(InvocationListener)
can be called to
add additional InvocationListener
s.invocationListeners
- the InvocationListener
spublic void addInvocationListener(InvocationListener invocationListener)
InvocationListener
to the end of the
list of invocation listeners.invocationListener
- the InvocationListener
to addpublic void willInvoke(java.lang.reflect.Method method, java.util.List<com.fasterxml.jackson.databind.JsonNode> arguments)
willInvoke
in interface InvocationListener
method
- is the method that will be invoked.arguments
- are the arguments that will be passed to the method when it is invoked.public void didInvoke(java.lang.reflect.Method method, java.util.List<com.fasterxml.jackson.databind.JsonNode> arguments, java.lang.Object result, java.lang.Throwable t, long duration)
didInvoke
in interface InvocationListener
method
- is the method that will was invoked.arguments
- are the arguments that were be passed to the method when it is invoked.result
- is the result of the method invocation. If an error arose, this value will be
null.t
- is the throwable that was thrown from the invocation, if no error arose, this value
will be null.duration
- is approximately the number of milliseconds that elapsed during which the method was invoked.