public class MethodExecutionContext extends Object
MethodExecutionListener| Modifier and Type | Class and Description |
|---|---|
static class |
MethodExecutionContext.Builder |
| Constructor and Description |
|---|
MethodExecutionContext() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomValue(String key,
Object value)
Store key/value pair.
|
ConnectionInfo |
getConnectionInfo() |
<T> T |
getCustomValue(String key,
Class<T> type) |
long |
getElapsedTime()
The time took to execute the method.
|
Method |
getMethod() |
Object[] |
getMethodArgs() |
ProxyConfig |
getProxyConfig() |
Object |
getResult() |
Object |
getTarget() |
Throwable |
getThrown() |
void |
setConnectionInfo(ConnectionInfo connectionInfo) |
void |
setElapsedTime(long elapsedTime) |
void |
setMethod(Method method)
Set a method to invoke.
|
void |
setMethodArgs(Object[] methodArgs)
Set method parameters to invoke.
|
void |
setProxyConfig(ProxyConfig proxyConfig) |
void |
setResult(Object result) |
void |
setTarget(Object target) |
void |
setThrown(Throwable thrown) |
public Object getTarget()
public void setTarget(Object target)
public Method getMethod()
public void setMethod(Method method)
MethodExecutionListener.beforeMethod(MethodExecutionContext), the newly set
method will be invoked.method - a method to invokepublic Object[] getMethodArgs()
public void setMethodArgs(Object[] methodArgs)
MethodExecutionListener.beforeMethod(MethodExecutionContext),
newly set parameters will be invoked.methodArgs - method parameterspublic Object getResult()
public void setResult(Object result)
public Throwable getThrown()
public void setThrown(Throwable thrown)
public long getElapsedTime()
Stopwatch.
By default, it uses SystemStopwatchFactory.SystemStopwatch which
uses milliseconds.public void setElapsedTime(long elapsedTime)
public ConnectionInfo getConnectionInfo()
public void setConnectionInfo(ConnectionInfo connectionInfo)
public ProxyConfig getProxyConfig()
public void setProxyConfig(ProxyConfig proxyConfig)
public void addCustomValue(String key, Object value)
key - keyvalue - valueCopyright © 2023. All rights reserved.