@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class IntermediateClientResponseControl extends Control implements DecodeableControl
NOTE: This class, and other classes within the
com.unboundid.ldap.sdk.unboundidds
package structure, are only
supported for use against Ping Identity, UnboundID, and
Nokia/Alcatel-Lucent 8661 server products. These classes provide support
for proprietary functionality or for external specifications that are not
considered stable or mature enough to be guaranteed to work in an
interoperable way with other types of LDAP servers.
IntermediateClientResponse ::= SEQUENCE { upstreamResponse [0] IntermediateClientResponse OPTIONAL, upstreamServerAddress [1] OCTET STRING OPTIONAL, upstreamServerSecure [2] BOOLEAN DEFAULT FALSE, serverName [3] OCTET STRING OPTIONAL, serverSessionID [4] OCTET STRING OPTIONAL, serverResponseID [5] OCTET STRING OPTIONAL, ... }See the documentation in the
IntermediateClientRequestControl
class
for an example of using the intermediate client request and response
controls.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
INTERMEDIATE_CLIENT_RESPONSE_OID
The OID (1.3.6.1.4.1.30221.2.5.2) for the intermediate client response
control.
|
Constructor and Description |
---|
IntermediateClientResponseControl(boolean isCritical,
IntermediateClientResponseValue value)
Creates a new intermediate client response control with the provided value.
|
IntermediateClientResponseControl(IntermediateClientResponseValue value)
Creates a new intermediate client response control with the provided value.
|
IntermediateClientResponseControl(IntermediateClientResponseValue upstreamResponse,
java.lang.String upstreamServerAddress,
java.lang.Boolean upstreamServerSecure,
java.lang.String serverName,
java.lang.String serverSessionID,
java.lang.String serverResponseID)
Creates a new intermediate client response control with the provided
information.
|
IntermediateClientResponseControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new intermediate client response control with the provided
information.
|
Modifier and Type | Method and Description |
---|---|
IntermediateClientResponseControl |
decodeControl(java.lang.String oid,
boolean isCritical,
ASN1OctetString value)
Creates a new instance of this decodeable control from the provided
information.
|
static IntermediateClientResponseControl |
decodeJSONControl(JSONObject controlObject,
boolean strict)
Attempts to decode the provided object as a JSON representation of an
intermediate client response control.
|
static IntermediateClientResponseControl |
get(LDAPResult result)
Extracts an intermediate client response control from the provided result.
|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available.
|
IntermediateClientResponseValue |
getResponseValue()
Retrieves the value for this intermediate client response.
|
java.lang.String |
getServerName()
Retrieves a string that identifies the server application that created this
intermediate client response value.
|
java.lang.String |
getServerResponseID()
Retrieves a string that may be used to identify the response in the server
application.
|
java.lang.String |
getServerSessionID()
Retrieves a string that may be used to identify the session in the server
application.
|
IntermediateClientResponseValue |
getUpstreamResponse()
Retrieves the wrapped response from an upstream server, if available.
|
java.lang.String |
getUpstreamServerAddress()
Retrieves the IP address or resolvable name of the upstream server system,
if available.
|
JSONObject |
toJSONControl()
Retrieves a representation of this intermediate client response control as
a JSON object.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP control to the provided
buffer.
|
java.lang.Boolean |
upstreamServerSecure()
Indicates whether the communication with the communication with the
upstream server is secure (i.e., whether communication between the
server application and the upstream server is safe from interpretation or
undetectable alteration by a third party observer or interceptor).
|
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 INTERMEDIATE_CLIENT_RESPONSE_OID
public IntermediateClientResponseControl(@Nullable IntermediateClientResponseValue upstreamResponse, @Nullable java.lang.String upstreamServerAddress, @Nullable java.lang.Boolean upstreamServerSecure, @Nullable java.lang.String serverName, @Nullable java.lang.String serverSessionID, @Nullable java.lang.String serverResponseID)
upstreamResponse
- A wrapped intermediate client response from
an upstream server. It may be null
if there is no wrapped upstream response.upstreamServerAddress
- The IP address or resolvable name of the
upstream server system. It may be
null
if there is no upstream server
or its address is not available.upstreamServerSecure
- Indicates whether communication with the
upstream server is secure. It may be
null
if there is no upstream server
or it is not known whether the communication
is secure.serverName
- An identifier string that summarizes the
server application that created this
intermediate client response. It may be
null
if that information is not
available.serverSessionID
- A string that may be used to identify the
session in the server application. It may
be null
if there is no available
session identifier.serverResponseID
- A string that may be used to identify the
response in the server application. It may
be null
if there is no available
response identifier.public IntermediateClientResponseControl(@NotNull java.lang.String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException
oid
- The OID for the control.isCritical
- Indicates whether the control should be marked
critical.value
- The encoded value for the control. This may be
null
if no value was provided.LDAPException
- If the provided control cannot be decoded as an
intermediate client response control.public IntermediateClientResponseControl(@NotNull IntermediateClientResponseValue value)
value
- The value to use for this intermediate client response
control. It must not be null
.public IntermediateClientResponseControl(boolean isCritical, @NotNull IntermediateClientResponseValue value)
isCritical
- Indicates whether the control should be marked
critical. Response controls should generally not be
critical.value
- The value to use for this intermediate client response
control. It must not be null
.@NotNull public IntermediateClientResponseControl decodeControl(@NotNull java.lang.String oid, boolean isCritical, @Nullable ASN1OctetString value) throws LDAPException
decodeControl
in interface DecodeableControl
oid
- The OID for the control.isCritical
- Indicates whether the control should be marked
critical.value
- The encoded value for the control. This may be
null
if no value was provided.LDAPException
- If the provided information cannot be decoded as a
valid instance of this decodeable control.@Nullable public static IntermediateClientResponseControl get(@NotNull LDAPResult result) throws LDAPException
result
- The result from which to retrieve the intermediate client
response control.null
if the result did not contain an
intermediate client response control.LDAPException
- If a problem is encountered while attempting to
decode the intermediate client response control
contained in the provided result.@NotNull public IntermediateClientResponseValue getResponseValue()
@Nullable public IntermediateClientResponseValue getUpstreamResponse()
null
if
there is none.@Nullable public java.lang.String getUpstreamServerAddress()
null
if there is no upstream server or its address is not
available.@Nullable public java.lang.Boolean upstreamServerSecure()
Boolean.TRUE
if communication with the upstream server is
secure, Boolean.FALSE
if it is not secure, or
null
if there is no upstream server or it is not known
whether the communication is secure.@Nullable public java.lang.String getServerName()
@Nullable public java.lang.String getServerSessionID()
null
if there is none.@Nullable public java.lang.String getServerResponseID()
null
if there is none.@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 intermediate client response
control, the OID is "1.3.6.1.4.1.30221.2.5.2".
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 intermediate
client response 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 intermediate client
response 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:
upstream-response
-- An optional JSON object field whose
content represents an upstream response value. If present, the
fields of this object are the same as the fields that may be
included in the top-level value-json
object (optionally
including a nested upstream-response
field, if
appropriate).
upstream-server-address
-- An optional string field whose
value is the address of an upstream server to which the requested
operation was forwarded.
upstream-server-secure
-- An optional Boolean field that
indicates whether communication with an upstream server occurred
over a secure channel.
server-name
-- An optional string field whose value is the
name of the application used to process the request.
server-session-id
-- An optional string field whose value
is an identifier that the server is using to reference the current
communication session with the client.
server-response-id
-- An optional string field whose value
is an identifier that the server is using to reference the current
operation being processed.
toJSONControl
in class Control
@NotNull public static IntermediateClientResponseControl 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 intermediate client response control.