@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class W3CTraceContextRequestControl extends Control
W3CTraceContextRequestValue ::= SEQUENCE {
traceParent OCTET STRING,
traceState OCTET STRING OPTIONAL
}
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
W3C_TRACE_CONTEXT_REQUEST_OID
The OID (1.3.6.1.4.1.36733.2.1.5.7) for the W3C trace context request
control.
|
| Constructor and Description |
|---|
W3CTraceContextRequestControl(Control control)
Creates a new W3C trace context request control that has been decoded from
the provided generic control.
|
W3CTraceContextRequestControl(java.lang.String traceParent,
java.lang.String traceState)
Creates a new instance of this W3C trace context request control with the
provided information.
|
W3CTraceContextRequestControl(java.lang.String traceParent,
java.lang.String traceState,
boolean isCritical)
Creates a new instance of this W3C trace context request control with the
provided information.
|
| Modifier and Type | Method and Description |
|---|---|
static W3CTraceContextRequestControl |
decodeJSONControl(JSONObject controlObject,
boolean strict)
Attempts to decode the provided object as a JSON representation of a W3C
trace context request control.
|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available.
|
java.lang.String |
getTraceParent()
Retrieves the value of the "traceparent" header for this control.
|
java.lang.String |
getTraceState()
Retrieves the value of the "tracestate" header for this control, if
provided.
|
JSONObject |
toJSONControl()
Retrieves a representation of this W3C trace context request control as a
JSON object.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided
buffer.
|
decode, decode, decodeControls, decodeJSONControl, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toString, writeTo@NotNull public static final java.lang.String W3C_TRACE_CONTEXT_REQUEST_OID
public W3CTraceContextRequestControl(@NotNull java.lang.String traceParent, @Nullable java.lang.String traceState)
traceParent - The value of the "traceparent" header, as defined in
the W3C specification. It must not be null
or empty.traceState - The value of the "tracestate" header. It may be
null if no additional vendor-specific state
information is needed.public W3CTraceContextRequestControl(@NotNull java.lang.String traceParent, @Nullable java.lang.String traceState, boolean isCritical)
traceParent - The value of the "traceparent" header, as defined in
the W3C specification. It must not be null
or empty.traceState - The value of the "tracestate" header. It may be
null if no additional vendor-specific state
information is needed.isCritical - Indicates whether this control should be considered
critical.public W3CTraceContextRequestControl(@NotNull Control control) throws LDAPException
control - The generic control to decode as a W3C trace context
request control. It must not be null.LDAPException - If the provided generic control cannot be decoded
as a valid W3C trace context request control.@NotNull public java.lang.String getTraceParent()
@NotNull public java.lang.String getTraceState()
null if no such value was provided.@NotNull public java.lang.String getControlName()
getControlName in class Control@NotNull public JSONObject toJSONControl()
oid -- A mandatory string field whose value is the object
identifier for this control. For the W3C trace context request
control, the OID is "1.3.6.1.4.1.36733.2.1.5.7".
control-name -- An optional string field whose value is a
human-readable name for this control. This field is only intended for
descriptive purposes, and when decoding a control, the oid
field should be used to identify the type of control.
criticality -- A mandatory Boolean field used to indicate
whether this control is considered critical.
value-base64 -- An optional string field whose value is a
base64-encoded representation of the raw value for this W3C trace
context request control. Exactly one of the value-base64 and
value-json fields must be present.
value-json -- An optional JSON object field whose value is a
user-friendly representation of the value for this uniqueness request
control. Exactly one of the value-base64 and
value-json fields must be present, and if the
value-json field is used, then it will use the following
fields:
trace-parent -- A mandatory string field that holds the
value of the "traceparent" header for this control.
trace-state -- An optional string field that holds the
value of the "tracestate" header for this control.
toJSONControl in class Control@NotNull public static W3CTraceContextRequestControl decodeJSONControl(@NotNull JSONObject controlObject, boolean strict) throws LDAPException
controlObject - The JSON object to be decoded. It must not be
null.strict - Indicates whether to use strict mode when decoding
the provided JSON object. If this is true,
then this method will throw an exception if the
provided JSON object contains any unrecognized
fields. If this is false, then unrecognized
fields will be ignored.LDAPException - If the provided JSON object cannot be parsed as a
valid W3C trace context request control.