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