@NotMutable @ThreadSafety(level=NOT_THREADSAFE) public final class StartAdministrativeSessionExtendedRequest extends ExtendedRequest
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.
StartAdminSessionValue ::= SEQUENCE { clientName [0] OCTET STRING OPTIONAL, useDedicatedThreadPool [1] BOOLEAN DEFAULT FALSE, ... }
// Establish a connection to the server. LDAPConnection connection = new LDAPConnection(host, port); // Use the start administrative session operation to begin an administrative // session and request that operations in the session use the dedicated // thread pool. ExtendedResult extendedResult = connection.processExtendedOperation( new StartAdministrativeSessionExtendedRequest("Test Client", true)); // Authenticate the connection. It is strongly recommended that the // administrative session be created before the connection is authenticated. // Attempting to authenticate the connection before creating the // administrative session may result in the bind using a "regular" worker // thread rather than an administrative session worker thread, and if all // normal worker threads are busy or stuck, then the bind request may be // blocked. BindResult bindResult = connection.bind(userDN, password); // Use the connection to perform operations that may benefit from using an // administrative session (e.g., operations that troubleshoot and attempt to // correct some problem with the server). In this example, we'll just // request all monitor entries from the server. List<MonitorEntry> monitorEntries = MonitorManager.getMonitorEntries(connection); // Use the end administrative session operation to end the administrative // session and resume using normal worker threads for subsequent operations. // This isn't strictly needed if we just want to close the connection. extendedResult = connection.processExtendedOperation( new EndAdministrativeSessionExtendedRequest()); // Do other operations that don't need an administrative session. connection.close();
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
START_ADMIN_SESSION_REQUEST_OID
The OID (1.3.6.1.4.1.30221.2.6.13) for the start administrative session
extended request.
|
TYPE_EXTENDED_REQUEST_OID, TYPE_EXTENDED_REQUEST_VALUE
Constructor and Description |
---|
StartAdministrativeSessionExtendedRequest(ExtendedRequest extendedRequest)
Creates a new start administrative session extended request from the
provided generic extended request.
|
StartAdministrativeSessionExtendedRequest(java.lang.String clientName,
boolean useDedicatedThreadPool,
Control... controls)
Creates a new start administrative session extended request with the
provided information.
|
Modifier and Type | Method and Description |
---|---|
StartAdministrativeSessionExtendedRequest |
duplicate()
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
StartAdministrativeSessionExtendedRequest |
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
java.lang.String |
getClientName()
Retrieves the name of the client application issuing this request, if
available.
|
java.lang.String |
getExtendedRequestName()
Retrieves the user-friendly name for the extended request, if available.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.
|
boolean |
useDedicatedThreadPool()
Indicates whether the server should attempt to use a dedicated worker
thread pool for requests from this client.
|
encodeProtocolOp, getLastMessageID, getOID, getOperationType, getProtocolOpType, getValue, hasValue, process, responseReceived, toCode, writeTo
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getReferralConnector, getReferralConnectorInternal, getReferralDepth, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setReferralConnector, setReferralDepth, setResponseTimeoutMillis, toString
@NotNull public static final java.lang.String START_ADMIN_SESSION_REQUEST_OID
public StartAdministrativeSessionExtendedRequest(@Nullable java.lang.String clientName, boolean useDedicatedThreadPool, @Nullable Control... controls)
clientName
- The name of the client application issuing
this request. It may be null
if no
client name should be provided.useDedicatedThreadPool
- Indicates whether the server should use a
dedicated worker thread pool for requests
processed by this client. Note that the
server may define restrictions around the
use of a dedicated thread pool.controls
- The set of controls to include in the
request.public StartAdministrativeSessionExtendedRequest(@NotNull ExtendedRequest extendedRequest) throws LDAPException
extendedRequest
- The generic extended request to use to create this
start administrative session extended request.LDAPException
- If a problem occurs while decoding the request.@Nullable public java.lang.String getClientName()
null
if it was not included in the request.public boolean useDedicatedThreadPool()
true
if the server should attempt to use a dedicated
worker thread pool for requests from this client, or false
if not.@NotNull public StartAdministrativeSessionExtendedRequest duplicate()
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class ExtendedRequest
@NotNull public StartAdministrativeSessionExtendedRequest duplicate(@Nullable Control[] controls)
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class ExtendedRequest
controls
- The set of controls to include in the duplicate request.@NotNull public java.lang.String getExtendedRequestName()
getExtendedRequestName
in class ExtendedRequest
public void toString(@NotNull java.lang.StringBuilder buffer)
toString
in interface ProtocolOp
toString
in interface ReadOnlyLDAPRequest
toString
in class ExtendedRequest
buffer
- The buffer to which to append a string representation of
this request.