Package org.forgerock.services.context
Class TransactionIdContext
java.lang.Object
org.forgerock.services.context.AbstractContext
org.forgerock.services.context.TransactionIdContext
- All Implemented Interfaces:
Context
This context aims to hold the
TransactionId
.-
Field Summary
Fields inherited from class org.forgerock.services.context.AbstractContext
data
-
Constructor Summary
ConstructorDescriptionTransactionIdContext
(JsonValue savedContext, ClassLoader classLoader) Restores a saved context.TransactionIdContext
(Context parent, TransactionId transactionId) Constructs a new TransactionIdContext. -
Method Summary
Modifier and TypeMethodDescriptionReturns the transaction id.Updates the data object to have the current transactionId state.Methods inherited from class org.forgerock.services.context.AbstractContext
as, asContext, containsContext, containsContext, get, getContext, getContextName, getId, getParent, getRootId, isRootContext, toString
-
Constructor Details
-
TransactionIdContext
Constructs a new TransactionIdContext.- Parameters:
parent
- The parent contexttransactionId
- The transaction id to use in this context
-
TransactionIdContext
Restores a saved context.- Parameters:
savedContext
- The saved state.classLoader
- TheClassLoader
to use.
-
-
Method Details
-
getTransactionId
Returns the transaction id.- Returns:
- the transaction id
-
toJsonValue
Updates the data object to have the current transactionId state. Return this Context as a JsonValue (for persistence).- Specified by:
toJsonValue
in interfaceContext
- Overrides:
toJsonValue
in classAbstractContext
- Returns:
- the Context data as a JsonValue.
-