@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class RouteToBackendSetRequestControl extends Control
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.
selectBackendSets
method.true
or
false
. It must have a value with the following encoding:
RouteToBackendSetRequest ::= SEQUENCE { entryBalancingRequestProcessorID OCTET STRING, backendSets CHOICE { absoluteRoutingRequest [0] SET OF OCTET STRING, routingHint [1] SEQUENCE { firstGuessSetIDs SET OF OCTET STRING, fallbackSetIDs SET OF OCTET STRING OPTIONAL } ... } ... }The use of the route to backend set request control will also cause the server to behave as if the get backend set ID request control had been included, so that the get backend set ID response control may be included in operation result and search result entry messages as appropriate.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ROUTE_TO_BACKEND_SET_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.5.35) for the route to server request control.
|
Constructor and Description |
---|
RouteToBackendSetRequestControl(Control control)
Creates a new route to backend set request control that is decoded from the
provided generic control.
|
Modifier and Type | Method and Description |
---|---|
static RouteToBackendSetRequestControl |
createAbsoluteRoutingRequest(boolean isCritical,
java.lang.String entryBalancingRequestProcessorID,
java.util.Collection<java.lang.String> backendSetIDs)
Creates a new route to backend set request control that may be used for
absolute routing to the specified collection of backend sets.
|
static RouteToBackendSetRequestControl |
createAbsoluteRoutingRequest(boolean isCritical,
java.lang.String entryBalancingRequestProcessorID,
java.lang.String backendSetID)
Creates a new route to backend set request control that may be used for
absolute routing to the specified backend set.
|
static RouteToBackendSetRequestControl |
createRoutingHintRequest(boolean isCritical,
java.lang.String entryBalancingRequestProcessorID,
java.util.Collection<java.lang.String> firstGuessSetIDs,
java.util.Collection<java.lang.String> fallbackSetIDs)
Creates a new route to backend set request control that may be used to
provide a hint as to the backend set(s) to which the operation should be
forwarded, and an optional specification of fallback sets.
|
static RouteToBackendSetRequestControl |
createRoutingHintRequest(boolean isCritical,
java.lang.String entryBalancingRequestProcessorID,
java.lang.String firstGuessSetID,
java.util.Collection<java.lang.String> fallbackSetIDs)
Creates a new route to backend set request control that may be used to
provide a hint as to the backend set to which the operation should be
forwarded, and an optional specification of fallback sets.
|
static RouteToBackendSetRequestControl |
decodeJSONControl(JSONObject controlObject,
boolean strict)
Attempts to decode the provided object as a JSON representation of a
route to backend set request control.
|
java.util.Set<java.lang.String> |
getAbsoluteBackendSetIDs()
Retrieves the collection of backend set IDs for the backend sets to which
the request should be forwarded if the control uses absolute routing.
|
java.lang.String |
getControlName()
Retrieves the user-friendly name for this control, if available.
|
java.lang.String |
getEntryBalancingRequestProcessorID()
Retrieves the identifier for the entry-balancing request processor with
which the backend set IDs are associated.
|
java.util.Set<java.lang.String> |
getRoutingHintFallbackSetIDs()
Retrieves the collection of backend set IDs to which the request should be
forwarded if the control uses a routing hint and an explicit group of
fallback sets was specified.
|
java.util.Set<java.lang.String> |
getRoutingHintFirstGuessSetIDs()
Retrieves the collection of backend set IDs for the first guess of backend
sets to which the request should be forwarded if the control uses a routing
hint.
|
RouteToBackendSetRoutingType |
getRoutingType()
Retrieves the type of routing requested by this control.
|
JSONObject |
toJSONControl()
Retrieves a representation of this route to backend set 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 ROUTE_TO_BACKEND_SET_REQUEST_OID
public RouteToBackendSetRequestControl(@NotNull Control control) throws LDAPException
control
- The control to decode as a route to backend set request
control.LDAPException
- If the provided control cannot be decoded as a
route to backend set request control.@NotNull public static RouteToBackendSetRequestControl createAbsoluteRoutingRequest(boolean isCritical, @NotNull java.lang.String entryBalancingRequestProcessorID, @NotNull java.lang.String backendSetID)
isCritical
- Indicates whether the control
should be marked critical.entryBalancingRequestProcessorID
- The identifier for the
entry-balancing request processor
with which the backend set ID
is associated. It must not be
null
.backendSetID
- The backend set ID for the
backend set to which the request
should be forwarded. It must not
be null
.@NotNull public static RouteToBackendSetRequestControl createAbsoluteRoutingRequest(boolean isCritical, @NotNull java.lang.String entryBalancingRequestProcessorID, @NotNull java.util.Collection<java.lang.String> backendSetIDs)
isCritical
- Indicates whether the control
should be marked critical.entryBalancingRequestProcessorID
- The identifier for the
entry-balancing request processor
with which the backend set IDs
are associated. It must not be
null
.backendSetIDs
- The backend set IDs for the
backend sets to which the request
should be forwarded. It must not
be null
or empty.@NotNull public static RouteToBackendSetRequestControl createRoutingHintRequest(boolean isCritical, @NotNull java.lang.String entryBalancingRequestProcessorID, @NotNull java.lang.String firstGuessSetID, @Nullable java.util.Collection<java.lang.String> fallbackSetIDs)
isCritical
- Indicates whether the control
should be marked critical.entryBalancingRequestProcessorID
- The identifier for the
entry-balancing request processor
with which the backend set IDs
are associated. It must not be
null
.firstGuessSetID
- The backend set ID for the
backend set to try first. It
must not be null
.fallbackSetIDs
- The backend set ID(s) for the
backend set(s) to use if none of
the servers in the first guess
set returns a success result.
If this is null
, then the
server will use a default
fallback set of all backend sets
except for the first guess set.
If this is not null
, then
it must also be non-empty.@NotNull public static RouteToBackendSetRequestControl createRoutingHintRequest(boolean isCritical, @NotNull java.lang.String entryBalancingRequestProcessorID, @NotNull java.util.Collection<java.lang.String> firstGuessSetIDs, @Nullable java.util.Collection<java.lang.String> fallbackSetIDs)
isCritical
- Indicates whether the control
should be marked critical.entryBalancingRequestProcessorID
- The identifier for the
entry-balancing request processor
with which the backend set IDs
are associated. It must not be
null
.firstGuessSetIDs
- The backend set ID(s) for the
backend set(s) to try first. It
must not be null
or
empty.fallbackSetIDs
- The backend set ID(s) for the
backend set(s) to use if none of
the servers in the first guess
set returns a success result.
If this is null
, then the
server will use a default
fallback set of all backend sets
not included in the first guess.
If this is not null
, then
it must also be non-empty.@NotNull public java.lang.String getEntryBalancingRequestProcessorID()
@NotNull public RouteToBackendSetRoutingType getRoutingType()
@Nullable public java.util.Set<java.lang.String> getAbsoluteBackendSetIDs()
null
if the control uses a routing hint.@Nullable public java.util.Set<java.lang.String> getRoutingHintFirstGuessSetIDs()
null
if the control uses absolute
routing.@Nullable public java.util.Set<java.lang.String> getRoutingHintFallbackSetIDs()
null
if the
control uses absolute routing or if a default group of fallback
sets (all sets not included in the first guess) should be used.@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 route to backend set request
control, the OID is "1.3.6.1.4.1.30221.2.5.35".
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 route to
backend set 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 route to backend set
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:
request-processor
-- A mandatory string field whose value
is an identifier for the entry-balancing request processor to which
this control applies.
routing-type
-- A mandatory string field whose value
specifies the type of routing to perform. The value must be one
of "absolute-routing
" or "routing-hint
".
backend-set-ids
-- A mandatory, non-empty array field whose
values are strings that specify the primary backend set(s) to use.
fallback-backend-set-ids
-- An optional array field whose
values specify alternative backend sets that may be used if the
routing-type
value is "routing-hint
" and the
requested operation fails in the primary backend sets. This field
must not be provided with a routing-type
value of
"absolute-routing
", and it may optionally be used with a
routing-type
value of "routing-hint
".
toJSONControl
in class Control
@NotNull public static RouteToBackendSetRequestControl 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 route to backend set request control.