public class BindRequestDsml extends AbstractResultResponseRequestDsml<BindRequest,BindResponse> implements BindRequest
Constructor and Description |
---|
BindRequestDsml(LdapApiService codec)
Creates a new getDecoratedMessage() of AuthRequestDsml.
|
BindRequestDsml(LdapApiService codec,
BindRequest ldapMessage)
Creates a new getDecoratedMessage() of AuthRequestDsml.
|
Modifier and Type | Method and Description |
---|---|
BindRequest |
addAllControls(Control[] controls)
Adds an array of controls to this Message.
|
BindRequest |
addControl(Control control)
Adds a control to this Message.
|
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.
|
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.
|
MessageTypeEnum |
getType()
Gets the LDAP message type code associated with this Message.
|
boolean |
getVersion3()
Gets whether or not the Ldap v3 protocol is used.
|
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 isSimple)
Sets the authentication mechanism to simple or to SASL based
authentication.
|
BindRequest |
setVersion3(boolean isVersion3)
Sets whether or not the LDAP v3 or v2 protocol is used.
|
org.dom4j.Element |
toDsml(org.dom4j.Element root)
Creates the Request Element and adds RequestID and Controls.
|
abandon, addAbandonListener, computeLength, encode, getResultResponse, isAbandoned
hasResponse
get, getCodecService, getControl, getControls, getCurrentControl, getDecorated, getMessageId, hasControl, put
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResultResponse
hasResponse
get, getControl, getControls, getMessageId, hasControl, put
abandon, addAbandonListener, isAbandoned
public BindRequestDsml(LdapApiService codec)
codec
- The LDAP Service to usepublic BindRequestDsml(LdapApiService codec, BindRequest ldapMessage)
codec
- The LDAP Service to useldapMessage
- the message to decoratepublic MessageTypeEnum getType()
getType
in interface Message
getType
in class AbstractDsmlMessageDecorator<BindRequest>
public org.dom4j.Element toDsml(org.dom4j.Element root)
toDsml
in interface DsmlDecorator<BindRequest>
toDsml
in class AbstractResultResponseRequestDsml<BindRequest,BindResponse>
root
- the root elementpublic MessageTypeEnum getResponseType()
getResponseType
in interface SingleReplyRequest
public boolean isSimple()
isSimple
in interface BindRequest
public boolean getSimple()
getSimple
in interface BindRequest
public BindRequest setSimple(boolean isSimple)
setSimple
in interface BindRequest
isSimple
- 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 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 isVersion3)
setVersion3
in interface BindRequest
isVersion3
- if true the client will be exhibiting version 3 bind behavior,
If false is used version 2 behavior will be exhibited.public String getSaslMechanism()
getSaslMechanism
in interface BindRequest
public BindRequest setSaslMechanism(String saslMechanism)
setSaslMechanism
in interface BindRequest
saslMechanism
- the SASL mechanismpublic BindRequest setMessageId(int messageId)
setMessageId
in interface BindRequest
setMessageId
in interface Message
setMessageId
in class AbstractDsmlMessageDecorator<BindRequest>
messageId
- The message Idpublic BindRequest addControl(Control control)
addControl
in interface BindRequest
addControl
in interface Message
addControl
in class AbstractDsmlMessageDecorator<BindRequest>
control
- the control to add.public BindRequest addAllControls(Control[] controls)
addAllControls
in interface BindRequest
addAllControls
in interface Message
addAllControls
in class AbstractDsmlMessageDecorator<BindRequest>
controls
- the controls to add.public BindRequest removeControl(Control control)
removeControl
in interface BindRequest
removeControl
in interface Message
removeControl
in class AbstractDsmlMessageDecorator<BindRequest>
control
- the control to remove.Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.