Package org.forgerock.services.context
Class TransactionIdContext
- java.lang.Object
-
- org.forgerock.services.context.AbstractContext
-
- org.forgerock.services.context.TransactionIdContext
-
- All Implemented Interfaces:
Context
public class TransactionIdContext extends AbstractContext
This context aims to hold theTransactionId
.
-
-
Field Summary
-
Fields inherited from class org.forgerock.services.context.AbstractContext
data
-
-
Constructor Summary
Constructors Constructor Description TransactionIdContext(JsonValue savedContext, ClassLoader classLoader)
Restores a saved context.TransactionIdContext(Context parent, TransactionId transactionId)
Constructs a new TransactionIdContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransactionId
getTransactionId()
Returns the transaction id.JsonValue
toJsonValue()
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 Detail
-
TransactionIdContext
public TransactionIdContext(Context parent, TransactionId transactionId)
Constructs a new TransactionIdContext.- Parameters:
parent
- The parent contexttransactionId
- The transaction id to use in this context
-
TransactionIdContext
public TransactionIdContext(JsonValue savedContext, ClassLoader classLoader)
Restores a saved context.- Parameters:
savedContext
- The saved state.classLoader
- TheClassLoader
to use.
-
-
Method Detail
-
getTransactionId
public TransactionId getTransactionId()
Returns the transaction id.- Returns:
- the transaction id
-
toJsonValue
public JsonValue 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.
-
-