public class BindRequestImpl extends AbstractAbandonableRequest implements BindRequest
Modifier and Type | Field and Description |
---|---|
BindResponse |
response
The associated response
|
controls
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, isAbandoned
hasResponse
get, getControl, getControls, getMessageId, getType, hasControl, put, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
hasResponse
get, getControl, getControls, getMessageId, getType, hasControl, put
addAbandonListener, isAbandoned
public BindResponse response
public BindRequestImpl()
public boolean isSimple()
isSimple
in interface BindRequest
public boolean getSimple()
getSimple
in interface BindRequest
public BindRequest setSimple(boolean simple)
setSimple
in interface BindRequest
simple
- true if authentication is simple, false otherwise.public byte[] getCredentials()
getCredentials
in interface BindRequest
public BindRequest setCredentials(String credentials)
setCredentials
in interface BindRequest
credentials
- the credentials if authentication is simplepublic BindRequest setCredentials(byte[] credentials)
setCredentials
in interface BindRequest
credentials
- the credentials if authentication is simplepublic String getSaslMechanism()
getSaslMechanism
in interface BindRequest
public BindRequest setSaslMechanism(String saslMechanism)
setSaslMechanism
in interface BindRequest
saslMechanism
- the SASL mechanismpublic String getName()
getName
in interface BindRequest
public BindRequest setName(String name)
setName
in interface BindRequest
name
- the name of the authenticating user - leave null for anonymous user.public Dn getDn()
getDn
in interface BindRequest
public BindRequest setDn(Dn dn)
setDn
in interface BindRequest
dn
- the DN of the authenticating user - leave null for anonymous user.public boolean isVersion3()
isVersion3
in interface BindRequest
public boolean getVersion3()
getVersion3
in interface BindRequest
public BindRequest setVersion3(boolean version3)
setVersion3
in interface BindRequest
version3
- 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 BindRequest
setMessageId
in interface Message
setMessageId
in class AbstractMessage
messageId
- The message Idpublic BindRequest addControl(Control control)
addControl
in interface BindRequest
addControl
in interface Message
addControl
in class AbstractMessage
control
- the control to add.public BindRequest addAllControls(Control[] controls)
addAllControls
in interface BindRequest
addAllControls
in interface Message
addAllControls
in class AbstractMessage
controls
- the controls to add.public BindRequest removeControl(Control control)
removeControl
in interface BindRequest
removeControl
in interface Message
removeControl
in class AbstractMessage
control
- the control to remove.public MessageTypeEnum getResponseType()
getResponseType
in interface SingleReplyRequest
public BindResponse getResultResponse()
getResultResponse
in interface ResultResponseRequest
public void abandon()
abandon
in interface AbandonableRequest
abandon
in class AbstractAbandonableRequest
public boolean equals(Object obj)
equals
in class AbstractRequest
obj
- the object to compare this Message to for equalitypublic int hashCode()
hashCode
in class AbstractRequest
Object.hashCode()
Copyright © 2003–2015 The Apache Software Foundation. All rights reserved.