Class TransactionIDRequestControl
java.lang.Object
com.unboundid.ldap.sdk.Control
com.unboundid.ldap.sdk.forgerockds.controls.TransactionIDRequestControl
- All Implemented Interfaces:
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.
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe OID (1.3.6.1.4.1.36733.2.1.5.1) for the transaction ID request control. -
Constructor Summary
ConstructorsConstructorDescriptionTransactionIDRequestControl(boolean isCritical, 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(String transactionID) Creates a new transaction ID request control with the specified identifier. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the user-friendly name for this control, if available.Retrieves the transaction ID to use for this control.voidtoString(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 Details
-
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:
-
-
Constructor Details
-
TransactionIDRequestControl
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
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
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 Details
-
getTransactionID
Retrieves the transaction ID to use for this control.- Returns:
- The transaction ID to use for this control.
-
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:
getControlNamein classControl- Returns:
- The user-friendly name for this control, or the OID if no user-friendly name is available.
-
toString
Appends a string representation of this LDAP control to the provided buffer.
-