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 theMethodInvocation
object passed to the invoke method ofMethodInterceptor
and theConstructorInvocation
object passed to the invoke method ofConstructorInterceptor
. It allows HK2 users of the AOP interception feature to easily pass data between interceptors on the same invocatio stack
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getUserData(java.lang.String key)
Gets the user data associated with the given keyvoid
setUserData(java.lang.String key, java.lang.Object data)
Sets the user data to be associated with the invocation frame.
-
-
-
Method Detail
-
setUserData
void setUserData(java.lang.String key, java.lang.Object data)
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
java.lang.Object getUserData(java.lang.String key)
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
-
-