Interface MethodExecutionInfo
- All Known Implementing Classes:
MockMethodExecutionInfo
public interface MethodExecutionInfo
Hold method execution related information.
- Author:
- Tadaya Tsuyukubo
-
Method Summary
Modifier and TypeMethodDescriptionGet theConnectionInfo
.Get the duration of the method invocation.Get the invokedMethod
.Object[]
Get the arguments of the invocation.Get the proxy event type.Get the result of invocation.Get the invoked object.long
Get the thread ID.Get the thread name.Get the thrown exception.RetrieveValueStore
which is associated to the scope of before/after method execution.
-
Method Details
-
getTarget
Object getTarget()Get the invoked object.- Returns:
- the proxy instance that the method was invoked on
-
getMethod
-
getMethodArgs
-
getResult
Get the result of invocation. ForProxyExecutionListener.beforeMethod(MethodExecutionInfo)
callback, this returnsnull
.- Returns:
- result
-
getThrown
Get the thrown exception. ForProxyExecutionListener.beforeMethod(MethodExecutionInfo)
callback or when the invocation did't throw any error, this returnsnull
.- Returns:
- thrown exception
-
getConnectionInfo
Get theConnectionInfo
. When invoked operation is not associated to theConnection
, this returnsnull
.- Returns:
- connection info
-
getExecuteDuration
Duration getExecuteDuration()Get the duration of the method invocation. ForProxyExecutionListener.beforeMethod(MethodExecutionInfo)
callback, this returnsDuration.ZERO
.- Returns:
- execution duration
-
getThreadName
-
getThreadId
long getThreadId()Get the thread ID.- Returns:
- thread ID
-
getProxyEventType
ProxyEventType getProxyEventType()Get the proxy event type.- Returns:
- proxy event type; either
ProxyEventType.BEFORE_METHOD
orProxyEventType.AFTER_METHOD
-
getValueStore
ValueStore getValueStore()RetrieveValueStore
which is associated to the scope of before/after method execution. Mainly used for passing values betweenProxyExecutionListener.beforeMethod(MethodExecutionInfo)
andProxyExecutionListener.afterMethod(MethodExecutionInfo)
.- Returns:
- value store
-