public final class TransactionId extends Object
TransactionId.createSubTransactionId()
so that Audit
events reported by the external system can also be tied back to the original stimulus.
Due to the fact that each TransactionId instance creates a sequence of sub-transaction IDs, the same TransactionId
object should be used while fulfilling a given request; it is not appropriate to create multiple instances of
TransactionId with the same value as this would lead to duplicate sub-transaction ID values. As such, two instances
of TransactionId with the same value are not considered equal.
This class is thread-safe.Constructor and Description |
---|
TransactionId()
Construct a
TransactionId with a random value. |
TransactionId(String value)
Construct a
TransactionId with the specified value. |
Modifier and Type | Method and Description |
---|---|
TransactionId |
createSubTransactionId()
Creates a new TransactionId, child of this one.
|
String |
getValue()
Returns the value of this TransactionId.
|
JsonValue |
toJson()
Returns a representation of this TransactionId as a JsonValue.
|
static TransactionId |
valueOf(JsonValue value)
Creates a TransactionId from a JsonValue.
|
public TransactionId()
TransactionId
with a random value.public TransactionId(String value)
TransactionId
with the specified value. The value must not be null nor empty.value
- The value to initialize the transactionId from.public String getValue()
TransactionId
value.public TransactionId createSubTransactionId()
TransactionId
value that can be passed to an external system.public JsonValue toJson()
public static TransactionId valueOf(JsonValue value)
value
- the JsonValue used to create the TransactionId, composed of 2 fields : value and
subTransactionIdCounter.Copyright © 2010-2018, ForgeRock All Rights Reserved.