Class TransactionIDRequestControl
- java.lang.Object
-
- com.unboundid.ldap.sdk.Control
-
- com.unboundid.ldap.sdk.forgerockds.controls.TransactionIDRequestControl
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class TransactionIDRequestControl extends Control
This class provides an implementation of a control that can be used to specify an external identifier for a request sent to a ForgeRock Directory Server that will appear in the access log message for the associated operation.
This request control has an OID of 1.3.6.1.4.1.36733.2.1.5.1, and its value is the string representation of the desired transaction ID. The control is typically not marked critical.
Example
The following example demonstrates the use of the transaction ID request control:ModifyRequest modifyRequest = new ModifyRequest("dc=example,dc=com", new Modification(ModificationType.REPLACE, "attrName", "attrValue")); modifyRequest.addControl(new TransactionIDRequestControl("test-txn-id")); LDAPResult modifyResult = connection.modify(modifyRequest);
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TRANSACTION_ID_REQUEST_OID
The OID (1.3.6.1.4.1.36733.2.1.5.1) for the transaction ID request control.
-
Constructor Summary
Constructors Constructor Description TransactionIDRequestControl(boolean isCritical, java.lang.String transactionID)
Creates a new transaction ID request control with the specified identifier and criticality.TransactionIDRequestControl(Control control)
Creates a new transaction ID request control which is decoded from the provided generic control.TransactionIDRequestControl(java.lang.String transactionID)
Creates a new transaction ID request control with the specified identifier.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getControlName()
Retrieves the user-friendly name for this control, if available.java.lang.String
getTransactionID()
Retrieves the transaction ID to use for this control.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided buffer.-
Methods inherited from class com.unboundid.ldap.sdk.Control
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toJSONControl, toString, writeTo
-
-
-
-
Field Detail
-
TRANSACTION_ID_REQUEST_OID
@NotNull public static final java.lang.String TRANSACTION_ID_REQUEST_OID
The OID (1.3.6.1.4.1.36733.2.1.5.1) for the transaction ID request control.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TransactionIDRequestControl
public TransactionIDRequestControl(@NotNull java.lang.String transactionID)
Creates a new transaction ID request control with the specified identifier. It will not be marked critical.- Parameters:
transactionID
- The transaction ID to use for this control. It must not benull
.
-
TransactionIDRequestControl
public TransactionIDRequestControl(boolean isCritical, @NotNull java.lang.String transactionID)
Creates a new transaction ID request control with the specified identifier and criticality.- Parameters:
isCritical
- Indicates whether the control should be marked critical.transactionID
- The transaction ID to use for this control. It must not benull
.
-
TransactionIDRequestControl
public TransactionIDRequestControl(@NotNull Control control) throws LDAPException
Creates a new transaction ID request control which is decoded from the provided generic control.- Parameters:
control
- The generic control to be decoded as a transaction ID request control.- Throws:
LDAPException
- If the provided control cannot be decoded as a transaction ID request control.
-
-
Method Detail
-
getTransactionID
@NotNull public java.lang.String getTransactionID()
Retrieves the transaction ID to use for this control.- Returns:
- The transaction ID to use for this control.
-
getControlName
@NotNull public java.lang.String getControlName()
Retrieves the user-friendly name for this control, if available. If no user-friendly name has been defined, then the OID will be returned.- Overrides:
getControlName
in classControl
- Returns:
- The user-friendly name for this control, or the OID if no user-friendly name is available.
-
-