|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.ldap.sdk.LDAPRequest
com.unboundid.ldap.sdk.ExtendedRequest
com.unboundid.ldap.sdk.unboundidds.extensions.StartAdministrativeSessionExtendedRequest
@NotMutable @ThreadSafety(level=NOT_THREADSAFE) public final class StartAdministrativeSessionExtendedRequest
NOTE: This class is part of the Commercial Edition of the UnboundID LDAP SDK for Java. It is not available for use in applications that include only the Standard Edition of the LDAP SDK, and is not supported for use in conjunction with non-UnboundID products.This class provides an implementation of the start administrative session extended request, which clients may use to indicate that they are going to perform a set of administrative operations in the server. It may be used to identify the client to the server and to indicate whether subsequent requests received on the connection should be processed using worker threads in a dedicated thread pool (subject to server configuration restrictions).
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();
EndAdministrativeSessionExtendedRequest
,
Serialized FormField Summary | |
---|---|
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. |
Fields inherited from class com.unboundid.ldap.sdk.ExtendedRequest |
---|
TYPE_EXTENDED_REQUEST_OID, TYPE_EXTENDED_REQUEST_VALUE |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.unboundid.ldap.sdk.ExtendedRequest |
---|
encodeProtocolOp, getLastMessageID, getOID, getOperationType, getProtocolOpType, getValue, hasValue, process, responseReceived, writeTo |
Methods inherited from class com.unboundid.ldap.sdk.LDAPRequest |
---|
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setResponseTimeoutMillis, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String START_ADMIN_SESSION_REQUEST_OID
Constructor Detail |
---|
public StartAdministrativeSessionExtendedRequest(java.lang.String clientName, boolean useDedicatedThreadPool, 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(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.Method Detail |
---|
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.public StartAdministrativeSessionExtendedRequest duplicate()
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class ExtendedRequest
public StartAdministrativeSessionExtendedRequest duplicate(Control[] controls)
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class ExtendedRequest
controls
- The set of controls to include in the duplicate request.
public java.lang.String getExtendedRequestName()
getExtendedRequestName
in class ExtendedRequest
public void toString(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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |