Package org.glassfish.hk2.api
Interface HK2Invocation
- All Known Implementing Classes:
ConstructorInterceptorHandler.ConstructorInvocationImpl
,MethodInterceptorHandler.MethodInvocationImpl
public interface HK2Invocation
This is an interface that is also implemented by the
MethodInvocation
object
passed to the invoke method of MethodInterceptor
and the ConstructorInvocation
object
passed to the invoke method of ConstructorInterceptor
.
It allows HK2 users of the AOP interception feature to easily pass
data between interceptors on the same invocatio stack-
Method Summary
Modifier and TypeMethodDescriptiongetUserData
(String key) Gets the user data associated with the given keyvoid
setUserData
(String key, Object data) Sets the user data to be associated with the invocation frame.
-
Method Details
-
setUserData
Sets the user data to be associated with the invocation frame. The key may not be null. If data is null then the data associated with the key is removed- Parameters:
key
- a non-null identifier for user data to be associated with the invocation framedata
- possibly null data. If non-null it will replace any value previously associated with the key. If null it will remove the key from the map
-
getUserData
Gets the user data associated with the given key- Parameters:
key
- The key for which to get data. May not be null- Returns:
- The user data previously associated with this key, or null if there was no user data associated with this key
-