Class IntermediateClientRequestControl
- java.lang.Object
-
- com.unboundid.ldap.sdk.Control
-
- com.unboundid.ldap.sdk.unboundidds.controls.IntermediateClientRequestControl
-
- All Implemented Interfaces:
java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class IntermediateClientRequestControl extends Control
This class defines an intermediate client request control, which can be used to provide a server with information about the client and any downstream clients that it may have. It can be used to help trace operations from the client to the directory server, potentially through any intermediate hops (like proxy servers) that may also support the intermediate client controls.
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.
This control is not based on any public standard. It was originally developed for use with the Ping Identity, UnboundID, and Nokia/Alcatel-Lucent 8661 Directory Server. The value of this control uses the following encoding:
IntermediateClientRequest ::= SEQUENCE { downstreamRequest [0] IntermediateClientRequest OPTIONAL, downstreamClientAddress [1] OCTET STRING OPTIONAL, downstreamClientSecure [2] BOOLEAN DEFAULT FALSE, clientIdentity [3] authzId OPTIONAL, clientName [4] OCTET STRING OPTIONAL, clientSessionID [5] OCTET STRING OPTIONAL, clientRequestID [6] OCTET STRING OPTIONAL, ... }
Example
The following example demonstrates the use of the intermediate client controls to perform a search operation in the directory server. The request will be from an application named "my client" with a session ID of "session123" and a request ID of "request456":SearchRequest searchRequest = new SearchRequest("dc=example,dc=com", SearchScope.SUB, Filter.createEqualityFilter("uid", "john.doe")); searchRequest.addControl(new IntermediateClientRequestControl(null, null, null, null, "my client", "session123", "request456")); SearchResult searchResult = connection.search(searchRequest); IntermediateClientResponseControl c = IntermediateClientResponseControl.get(searchResult); if (c != null) { // There was an intermediate client response control. IntermediateClientResponseValue responseValue = c.getResponseValue(); }
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
INTERMEDIATE_CLIENT_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.5.2) for the intermediate client request control.
-
Constructor Summary
Constructors Constructor Description IntermediateClientRequestControl(boolean isCritical, IntermediateClientRequestValue value)
Creates a new intermediate client request control with the provided value.IntermediateClientRequestControl(Control control)
Creates a new intermediate client request control which is decoded from the provided generic control.IntermediateClientRequestControl(IntermediateClientRequestValue value)
Creates a new intermediate client request control with the provided value.IntermediateClientRequestControl(IntermediateClientRequestValue downstreamRequest, java.lang.String downstreamClientAddress, java.lang.Boolean downstreamClientSecure, java.lang.String clientIdentity, java.lang.String clientName, java.lang.String clientSessionID, java.lang.String clientRequestID)
Creates a new intermediate client request control with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Boolean
downstreamClientSecure()
Indicates whether the communication with the communication with the downstream client is secure (i.e., whether communication between the client application and the downstream client is safe from interpretation or undetectable alteration by a third party observer or interceptor).java.lang.String
getClientIdentity()
Retrieves the requested client authorization identity, if available.java.lang.String
getClientName()
Retrieves a string that identifies the client application that created this intermediate client request value.java.lang.String
getClientRequestID()
Retrieves a string that may be used to identify the request in the client application.java.lang.String
getClientSessionID()
Retrieves a string that may be used to identify the session in the client application.java.lang.String
getControlName()
Retrieves the user-friendly name for this control, if available.java.lang.String
getDownstreamClientAddress()
Retrieves the IP address or resolvable name of the downstream client system, if available.IntermediateClientRequestValue
getDownstreamRequest()
Retrieves the wrapped request from a downstream client, if available.IntermediateClientRequestValue
getRequestValue()
Retrieves the value for this intermediate client request.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, deregisterDecodeableControl, encode, encodeControls, equals, getOID, getValue, hashCode, hasValue, isCritical, readFrom, registerDecodeableControl, registerDecodeableControl, toString, writeTo
-
-
-
-
Field Detail
-
INTERMEDIATE_CLIENT_REQUEST_OID
@NotNull public static final java.lang.String INTERMEDIATE_CLIENT_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.5.2) for the intermediate client request control.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IntermediateClientRequestControl
public IntermediateClientRequestControl(@Nullable IntermediateClientRequestValue downstreamRequest, @Nullable java.lang.String downstreamClientAddress, @Nullable java.lang.Boolean downstreamClientSecure, @Nullable java.lang.String clientIdentity, @Nullable java.lang.String clientName, @Nullable java.lang.String clientSessionID, @Nullable java.lang.String clientRequestID)
Creates a new intermediate client request control with the provided information. It will be marked critical.- Parameters:
downstreamRequest
- A wrapped intermediate client request from a downstream client. It may benull
if there is no downstream request.downstreamClientAddress
- The IP address or resolvable name of the downstream client system. It may benull
if there is no downstream client or its address is not available.downstreamClientSecure
- Indicates whether communication with the downstream client is secure. It may benull
if there is no downstream client or it is not known whether the communication is secure.clientIdentity
- The requested client authorization identity. It may benull
if there is no requested authorization identity.clientName
- An identifier string that summarizes the client application that created this intermediate client request. It may benull
if that information is not available.clientSessionID
- A string that may be used to identify the session in the client application. It may benull
if there is no available session identifier.clientRequestID
- A string that may be used to identify the request in the client application. It may benull
if there is no available request identifier.
-
IntermediateClientRequestControl
public IntermediateClientRequestControl(@NotNull IntermediateClientRequestValue value)
Creates a new intermediate client request control with the provided value. It will be marked critical.- Parameters:
value
- The value to use for this intermediate client request control. It must not benull
.
-
IntermediateClientRequestControl
public IntermediateClientRequestControl(boolean isCritical, @NotNull IntermediateClientRequestValue value)
Creates a new intermediate client request control with the provided value.- Parameters:
isCritical
- Indicates whether the control should be marked critical.value
- The value to use for this intermediate client request control. It must not benull
.
-
IntermediateClientRequestControl
public IntermediateClientRequestControl(@NotNull Control control) throws LDAPException
Creates a new intermediate client request control which is decoded from the provided generic control.- Parameters:
control
- The generic control to be decoded as an intermediate client request control.- Throws:
LDAPException
- If the provided control cannot be decoded as an intermediate client request control.
-
-
Method Detail
-
getRequestValue
@NotNull public IntermediateClientRequestValue getRequestValue()
Retrieves the value for this intermediate client request.- Returns:
- The value for this intermediate client request.
-
getDownstreamRequest
@Nullable public IntermediateClientRequestValue getDownstreamRequest()
Retrieves the wrapped request from a downstream client, if available.- Returns:
- The wrapped request from a downstream client, or
null
if there is none.
-
getClientIdentity
@Nullable public java.lang.String getClientIdentity()
Retrieves the requested client authorization identity, if available.- Returns:
- The requested client authorization identity, or
null
if there is none.
-
getDownstreamClientAddress
@Nullable public java.lang.String getDownstreamClientAddress()
Retrieves the IP address or resolvable name of the downstream client system, if available.- Returns:
- The IP address or resolvable name of the downstream client system,
or
null
if there is no downstream client or its address is not available.
-
downstreamClientSecure
@Nullable public java.lang.Boolean downstreamClientSecure()
Indicates whether the communication with the communication with the downstream client is secure (i.e., whether communication between the client application and the downstream client is safe from interpretation or undetectable alteration by a third party observer or interceptor).- Returns:
Boolean.TRUE
if communication with the downstream client is secure,Boolean.FALSE
if it is not secure, ornull
if there is no downstream client or it is not known whether the communication is secure.
-
getClientName
@Nullable public java.lang.String getClientName()
Retrieves a string that identifies the client application that created this intermediate client request value.- Returns:
- A string that may be used to identify the client application that created this intermediate client request value.
-
getClientSessionID
@Nullable public java.lang.String getClientSessionID()
Retrieves a string that may be used to identify the session in the client application.- Returns:
- A string that may be used to identify the session in the client
application, or
null
if there is none.
-
getClientRequestID
@Nullable public java.lang.String getClientRequestID()
Retrieves a string that may be used to identify the request in the client application.- Returns:
- A string that may be used to identify the request in the client
application, or
null
if there is none.
-
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.
-
-