public class BindRequestImpl extends AbstractAbandonableRequest implements BindRequest
AbstractAbandonableRequest.RequestObservable| Modifier and Type | Field and Description |
|---|---|
private byte[] |
credentials
The passwords, keys or tickets used to verify user identity
|
private Dn |
dn
Distinguished name identifying the name of the authenticating subject -
defaults to the empty string
|
private int |
hCredentials
A storage for credentials hashCode
|
private boolean |
isSimple
Simple vs.
|
private boolean |
isVersion3
Bind behavior exhibited by protocol version
|
private String |
mechanism
The mechanism used to decode user identity
|
private String |
name
String identifying the name of the authenticating subject -
defaults to the empty string
|
private BindResponse |
response
The associated response
|
serialVersionUIDcontrols| Constructor and Description |
|---|
BindRequestImpl()
Creates an BindRequest implementation to bind to an LDAP server.
|
| Modifier and Type | Method and Description |
|---|---|
void |
abandon()
RFC 2251/4511 [Section 4.11]: Abandon, Bind, Unbind, and StartTLS operations
cannot be abandoned.
|
BindRequest |
addAllControls(Control[] controls)
Adds an array of controls to this Message.
|
BindRequest |
addControl(Control control)
Adds a control to this Message.
|
boolean |
equals(Object obj)
Checks to see if two messages are equivalent.
|
byte[] |
getCredentials()
Gets the simple credentials associated with a simple authentication
attempt or null if this request uses SASL authentication mechanisms.
|
Dn |
getDn()
Gets the DN of the subject in this authentication
request.
|
String |
getName()
Gets the name of the subject in this authentication
request.
|
MessageTypeEnum |
getResponseType()
Gets the protocol response message type for this request which produces
at least one response.
|
BindResponse |
getResultResponse()
The result containing response for this request.
|
String |
getSaslMechanism()
Gets the SASL mechanism String associated with this BindRequest if the
bind operation is using SASL.
|
boolean |
getSimple()
Checks to see if the authentication mechanism is simple and not SASL
based.
|
boolean |
getVersion3()
Gets whether or not the Ldap v3 protocol is used.
|
int |
hashCode() |
boolean |
isSimple()
Checks to see if the authentication mechanism is simple and not SASL
based.
|
boolean |
isVersion3()
Checks to see if the Ldap v3 protocol is used.
|
BindRequest |
removeControl(Control control)
Deletes a control removing it from this Message.
|
BindRequest |
setCredentials(byte[] credentials)
Sets the simple credentials associated with a simple authentication
attempt.
|
BindRequest |
setCredentials(String credentials)
Sets the simple credentials associated with a simple authentication
attempt.
|
BindRequest |
setDn(Dn dn)
Sets the DN of the subject in this authentication
request.
|
BindRequest |
setMessageId(int messageId)
Sets the Message ID for this request
|
BindRequest |
setName(String name)
Sets the name of the subject in this authentication
request.
|
BindRequest |
setSaslMechanism(String saslMechanism)
Sets the SASL mechanism String associated with this BindRequest if the
bind operation is using SASL.
|
BindRequest |
setSimple(boolean simple)
Sets the authentication mechanism to simple or to SASL based
authentication.
|
BindRequest |
setVersion3(boolean version3)
Sets whether or not the LDAP v3 or v2 protocol is used.
|
String |
toString()
Get a String representation of a BindRequest
|
addAbandonListener, isAbandonedhasResponseget, getControl, getControls, getMessageId, getType, hasControl, put, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waithasResponseget, getControl, getControls, getMessageId, getType, hasControl, putaddAbandonListener, isAbandonedprivate Dn dn
private String name
private byte[] credentials
private int hCredentials
private String mechanism
private boolean isSimple
private boolean isVersion3
private BindResponse response
public BindRequestImpl()
public boolean isSimple()
isSimple in interface BindRequestpublic boolean getSimple()
getSimple in interface BindRequestpublic BindRequest setSimple(boolean simple)
setSimple in interface BindRequestsimple - true if authentication is simple, false otherwise.public byte[] getCredentials()
getCredentials in interface BindRequestpublic BindRequest setCredentials(String credentials)
setCredentials in interface BindRequestcredentials - the credentials if authentication is simplepublic BindRequest setCredentials(byte[] credentials)
setCredentials in interface BindRequestcredentials - the credentials if authentication is simplepublic String getSaslMechanism()
getSaslMechanism in interface BindRequestpublic BindRequest setSaslMechanism(String saslMechanism)
setSaslMechanism in interface BindRequestsaslMechanism - the SASL mechanismpublic String getName()
getName in interface BindRequestpublic BindRequest setName(String name)
setName in interface BindRequestname - the name of the authenticating user - leave null for anonymous user.public Dn getDn()
getDn in interface BindRequestpublic BindRequest setDn(Dn dn)
setDn in interface BindRequestdn - the DN of the authenticating user - leave null for anonymous user.public boolean isVersion3()
isVersion3 in interface BindRequestpublic boolean getVersion3()
getVersion3 in interface BindRequestpublic BindRequest setVersion3(boolean version3)
setVersion3 in interface BindRequestversion3 - if true the client will be exhibiting version 3 bind behavior,
If false is used version 2 behavior will be exhibited.public BindRequest setMessageId(int messageId)
setMessageId in interface BindRequestsetMessageId in interface MessagesetMessageId in class AbstractMessagemessageId - The message Idpublic BindRequest addControl(Control control)
addControl in interface BindRequestaddControl in interface MessageaddControl in class AbstractMessagecontrol - the control to add.public BindRequest addAllControls(Control[] controls)
addAllControls in interface BindRequestaddAllControls in interface MessageaddAllControls in class AbstractMessagecontrols - the controls to add.public BindRequest removeControl(Control control)
removeControl in interface BindRequestremoveControl in interface MessageremoveControl in class AbstractMessagecontrol - the control to remove.public MessageTypeEnum getResponseType()
getResponseType in interface SingleReplyRequestpublic BindResponse getResultResponse()
getResultResponse in interface ResultResponseRequestpublic void abandon()
abandon in interface AbandonableRequestabandon in class AbstractAbandonableRequestpublic boolean equals(Object obj)
equals in class AbstractRequestobj - the object to compare this Message to for equalitypublic int hashCode()
hashCode in class AbstractRequestObject.hashCode()Copyright © 2003–2019 The Apache Software Foundation. All rights reserved.