@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class GenericSASLBindRequest extends SASLBindRequest
CRED_TYPE_SASL
VERSION_ELEMENT
Constructor and Description |
---|
GenericSASLBindRequest(java.lang.String bindDN,
java.lang.String mechanism,
ASN1OctetString credentials,
Control... controls)
Creates a new generic SASL bind request with the provided information.
|
Modifier and Type | Method and Description |
---|---|
GenericSASLBindRequest |
duplicate()
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
GenericSASLBindRequest |
duplicate(Control[] controls)
Creates a new instance of this LDAP request that may be modified without
impacting this request.
|
java.lang.String |
getBindDN()
Retrieves the bind DN for this SASL bind request, if any.
|
ASN1OctetString |
getCredentials()
Retrieves the credentials for the SASL bind request, if any.
|
java.lang.String |
getSASLMechanismName()
Retrieves the name of the SASL mechanism used in this SASL bind request.
|
protected BindResult |
process(LDAPConnection connection,
int depth)
Sends this bind request to the target server over the provided connection
and returns the corresponding response.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this request to the provided buffer.
|
getBindType, getLastMessageID, responseReceived, sendBindRequest, sendMessage
getOperationType, getRebindRequest
followReferrals, getControl, getControlList, getControls, getIntermediateResponseListener, getResponseTimeoutMillis, hasControl, hasControl, setFollowReferrals, setIntermediateResponseListener, setResponseTimeoutMillis, toString
public GenericSASLBindRequest(java.lang.String bindDN, java.lang.String mechanism, ASN1OctetString credentials, Control... controls)
bindDN
- The bind DN that should be used for the request. It
may be null
if the target identity should be
derived from the credentials or some other source.mechanism
- The name of the mechanism that should be used for the
SASL bind. It must not be null
.credentials
- The credentials that should be used for the SASL bind.
It may be null
if no credentials should be
used.controls
- The set of controls to include in the SASL bind
request. It may be null
or empty if no
request controls are needed.public java.lang.String getBindDN()
null
if the
target identity should be determined from the credentials or some
other mechanism.public java.lang.String getSASLMechanismName()
getSASLMechanismName
in class SASLBindRequest
public ASN1OctetString getCredentials()
null
if
there are none.protected BindResult process(LDAPConnection connection, int depth) throws LDAPException
process
in class BindRequest
connection
- The connection to use to send this bind request to the
server and read the associated response.depth
- The current referral depth for this request. It should
always be one for the initial request, and should only
be incremented when following referrals.LDAPException
- If a problem occurs while sending the request or
reading the response.public GenericSASLBindRequest duplicate()
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class BindRequest
public GenericSASLBindRequest duplicate(Control[] controls)
duplicate
in interface ReadOnlyLDAPRequest
duplicate
in class BindRequest
controls
- The set of controls to include in the duplicate request.public void toString(java.lang.StringBuilder buffer)
toString
in interface ReadOnlyLDAPRequest
toString
in class LDAPRequest
buffer
- The buffer to which to append a string representation of
this request.