Package com.unboundid.ldap.sdk
Interface ReadOnlyLDAPRequest
-
- All Superinterfaces:
java.io.Serializable
- All Known Subinterfaces:
ReadOnlyAddRequest
,ReadOnlyCompareRequest
,ReadOnlyDeleteRequest
,ReadOnlyModifyDNRequest
,ReadOnlyModifyRequest
,ReadOnlySearchRequest
- All Known Implementing Classes:
AddRequest
,ANONYMOUSBindRequest
,BindRequest
,CancelExtendedRequest
,ClearMissedNotificationChangesAlarmExtendedRequest
,CollectSupportDataExtendedRequest
,CompareRequest
,ConsumeSingleUseTokenExtendedRequest
,CRAMMD5BindRequest
,DeleteNotificationDestinationExtendedRequest
,DeleteNotificationSubscriptionExtendedRequest
,DeleteRequest
,DeliverOneTimePasswordExtendedRequest
,DeliverPasswordResetTokenExtendedRequest
,DeliverSingleUseTokenExtendedRequest
,DeregisterYubiKeyOTPDeviceExtendedRequest
,DIGESTMD5BindRequest
,EndAdministrativeSessionExtendedRequest
,EndBatchedTransactionExtendedRequest
,EndTransactionExtendedRequest
,ExtendedRequest
,EXTERNALBindRequest
,GeneratePasswordExtendedRequest
,GenerateTOTPSharedSecretExtendedRequest
,GenericSASLBindRequest
,GetBackupCompatibilityDescriptorExtendedRequest
,GetChangelogBatchExtendedRequest
,GetConfigurationExtendedRequest
,GetConnectionIDExtendedRequest
,GetPasswordQualityRequirementsExtendedRequest
,GetSubtreeAccessibilityExtendedRequest
,GetSupportedOTPDeliveryMechanismsExtendedRequest
,GSSAPIBindRequest
,IdentifyBackupCompatibilityProblemsExtendedRequest
,LDAPRequest
,ListConfigurationsExtendedRequest
,ListNotificationSubscriptionsExtendedRequest
,ModifyDNRequest
,ModifyRequest
,MultiUpdateExtendedRequest
,OAUTHBEARERBindRequest
,PasswordModifyExtendedRequest
,PasswordPolicyStateExtendedRequest
,PLAINBindRequest
,PurgeRetiredInterServerCertificatesExtendedRequest
,PurgeRetiredListenerCertificatesExtendedRequest
,RegisterYubiKeyOTPDeviceExtendedRequest
,ReplaceInterServerCertificateExtendedRequest
,ReplaceListenerCertificateExtendedRequest
,ReusableTOTPBindRequest
,RevokeTOTPSharedSecretExtendedRequest
,SASLBindRequest
,SCRAMBindRequest
,SCRAMSHA1BindRequest
,SCRAMSHA256BindRequest
,SCRAMSHA512BindRequest
,SearchRequest
,SetNotificationDestinationExtendedRequest
,SetNotificationSubscriptionExtendedRequest
,SetSubtreeAccessibilityExtendedRequest
,SimpleBindRequest
,SingleUseTOTPBindRequest
,StartAdministrativeSessionExtendedRequest
,StartBatchedTransactionExtendedRequest
,StartTLSExtendedRequest
,StartTransactionExtendedRequest
,StreamDirectoryValuesExtendedRequest
,StreamProxyValuesExtendedRequest
,UnboundIDCertificatePlusPasswordBindRequest
,UnboundIDDeliveredOTPBindRequest
,UnboundIDExternallyProcessedAuthenticationBindRequest
,UnboundIDTOTPBindRequest
,UnboundIDYubiKeyOTPBindRequest
,UpdatableLDAPRequest
,ValidateTOTPPasswordExtendedRequest
,WhoAmIExtendedRequest
@NotExtensible @ThreadSafety(level=INTERFACE_NOT_THREADSAFE) public interface ReadOnlyLDAPRequest extends java.io.Serializable
This interface defines a set of methods that may be safely called in an LDAP request without altering its contents. This interface must not be implemented by any class outside of the LDAP SDK.
This interface does not inherently provide the assurance of thread safety for the methods that it exposes, because it is still possible for a thread referencing the object which implements this interface to alter the request using methods not included in this interface. However, if it can be guaranteed that no thread will alter the underlying object, then the methods exposed by this interface can be safely invoked concurrently by any number of threads.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LDAPRequest
duplicate()
Creates a new instance of this LDAP request that may be modified without impacting this request.LDAPRequest
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without impacting this request.boolean
followReferrals(LDAPConnection connection)
Indicates whether to automatically follow any referrals encountered while processing this request.Control
getControl(java.lang.String oid)
Retrieves the control with the specified OID from this request.java.util.List<Control>
getControlList()
Retrieves a list containing the set of controls for this request.Control[]
getControls()
Retrieves the set of controls for this request.ReferralConnector
getReferralConnector(LDAPConnection connection)
Retrieves the referral connector that should be used when establishing a connection for the purpose of automatically following a referral.long
getResponseTimeoutMillis(LDAPConnection connection)
Retrieves the maximum length of time in milliseconds that processing on this operation should be allowed to block while waiting for a response from the server.boolean
hasControl()
Indicates whether this request contains at least one control.boolean
hasControl(java.lang.String oid)
Indicates whether this request contains at least one control with the specified OID.void
toCode(java.util.List<java.lang.String> lineList, java.lang.String requestID, int indentSpaces, boolean includeProcessing)
Appends a number of lines comprising the Java source code that can be used to recreate this request to the given list.java.lang.String
toString()
Retrieves a string representation of this request.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.
-
-
-
Method Detail
-
getControls
@NotNull Control[] getControls()
Retrieves the set of controls for this request. The caller must not alter this set of controls.- Returns:
- The set of controls for this request.
-
getControlList
@NotNull java.util.List<Control> getControlList()
Retrieves a list containing the set of controls for this request.- Returns:
- A list containing the set of controls for this request.
-
hasControl
boolean hasControl()
Indicates whether this request contains at least one control.- Returns:
true
if this request contains at least one control, orfalse
if not.
-
hasControl
boolean hasControl(@NotNull java.lang.String oid)
Indicates whether this request contains at least one control with the specified OID.- Parameters:
oid
- The object identifier for which to make the determination. It must not benull
.- Returns:
true
if this request contains at least one control with the specified OID, orfalse
if not.
-
getControl
@Nullable Control getControl(@NotNull java.lang.String oid)
Retrieves the control with the specified OID from this request. If this request has multiple controls with the specified OID, then the first will be returned.- Parameters:
oid
- The object identifier for which to retrieve the corresponding control. It must not benull
.- Returns:
- The first control found with the specified OID, or
null
if no control with that OID is included in this request.
-
getResponseTimeoutMillis
long getResponseTimeoutMillis(@Nullable LDAPConnection connection)
Retrieves the maximum length of time in milliseconds that processing on this operation should be allowed to block while waiting for a response from the server.- Parameters:
connection
- The connection to use in order to retrieve the default value, if appropriate. It may benull
to retrieve the request-specific timeout (which may be negative if no response-specific timeout has been set).- Returns:
- The maximum length of time in milliseconds that processing on this operation should be allowed to block while waiting for a response from the server, or zero if no timeout should be enforced.
-
followReferrals
boolean followReferrals(@NotNull LDAPConnection connection)
Indicates whether to automatically follow any referrals encountered while processing this request. If a value has been set for this request, then it will be returned. Otherwise, the default from the connection options for the provided connection will be used.- Parameters:
connection
- The connection whose connection options may be used in the course of making the determination. It must not benull
.- Returns:
true
if any referrals encountered during processing should be automatically followed, orfalse
if not.
-
getReferralConnector
@NotNull ReferralConnector getReferralConnector(@NotNull LDAPConnection connection)
Retrieves the referral connector that should be used when establishing a connection for the purpose of automatically following a referral.- Parameters:
connection
- The connection that may be used in the course of obtaining the appropriate referral connector. It must not benull
.- Returns:
- The referral connector that should be used for the purpose of
automatically following a referral. It will not be
null
.
-
duplicate
@NotNull LDAPRequest duplicate()
Creates a new instance of this LDAP request that may be modified without impacting this request.- Returns:
- A new instance of this LDAP request that may be modified without impacting this request.
-
duplicate
@NotNull LDAPRequest duplicate(@Nullable Control[] controls)
Creates a new instance of this LDAP request that may be modified without impacting this request. The provided controls will be used for the new request instead of duplicating the controls from this request.- Parameters:
controls
- The set of controls to include in the duplicate request.- Returns:
- A new instance of this LDAP request that may be modified without impacting this request.
-
toString
@NotNull java.lang.String toString()
Retrieves a string representation of this request.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this request.
-
toString
void toString(@NotNull java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.- Parameters:
buffer
- The buffer to which to append a string representation of this request.
-
toCode
void toCode(@NotNull java.util.List<java.lang.String> lineList, @NotNull java.lang.String requestID, int indentSpaces, boolean includeProcessing)
Appends a number of lines comprising the Java source code that can be used to recreate this request to the given list.- Parameters:
lineList
- The list to which the source code lines should be added.requestID
- The name that should be used as an identifier for the request. If this isnull
or empty, then a generic ID will be used.indentSpaces
- The number of spaces that should be used to indent the generated code. It must not be negative.includeProcessing
- Indicates whether the generated code should include code required to actually process the request and handle the result (iftrue
), or just to generate the request (iffalse
).
-
-