|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.api.ldap.model.message.AbstractMessage
org.apache.directory.api.ldap.model.message.AbstractRequest
org.apache.directory.api.ldap.model.message.AbstractAbandonableRequest
org.apache.directory.api.ldap.model.message.BindRequestImpl
public class BindRequestImpl
Bind protocol operation request which authenticates and begins a client session. Does not yet contain interfaces for SASL authentication mechanisms.
| Field Summary | |
|---|---|
BindResponse |
response
The associated response |
| Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage |
|---|
controls |
| Fields inherited from interface org.apache.directory.api.ldap.model.message.BindRequest |
|---|
RESP_TYPE, TYPE |
| Constructor Summary | |
|---|---|
BindRequestImpl()
Creates an BindRequest implementation to bind to an LDAP server. |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractAbandonableRequest |
|---|
addAbandonListener, isAbandoned |
| Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractRequest |
|---|
hasResponse |
| Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage |
|---|
get, getControl, getControls, getMessageId, getType, hasControl, put, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.Request |
|---|
hasResponse |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.Message |
|---|
get, getControl, getControls, getMessageId, getType, hasControl, put |
| Methods inherited from interface org.apache.directory.api.ldap.model.message.AbandonableRequest |
|---|
addAbandonListener, isAbandoned |
| Field Detail |
|---|
public BindResponse response
| Constructor Detail |
|---|
public BindRequestImpl()
| Method Detail |
|---|
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 simple
public BindRequest setCredentials(byte[] credentials)
setCredentials in interface BindRequestcredentials - the credentials if authentication is simple
public String getSaslMechanism()
getSaslMechanism in interface BindRequestpublic BindRequest setSaslMechanism(String saslMechanism)
setSaslMechanism in interface BindRequestsaslMechanism - the SASL mechanism
public 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 Id
public BindRequest addControl(Control control)
throws MessageException
addControl in interface BindRequestaddControl in interface MessageaddControl in class AbstractMessagecontrol - the control to add.
MessageException - if controls cannot be added to this Message or the control is
not known etc.
public BindRequest addAllControls(Control[] controls)
throws MessageException
addAllControls in interface BindRequestaddAllControls in interface MessageaddAllControls in class AbstractMessagecontrols - the controls to add.
MessageException - if controls cannot be added to this Message or they are not known etc.
public BindRequest removeControl(Control control)
throws MessageException
removeControl in interface BindRequestremoveControl in interface MessageremoveControl in class AbstractMessagecontrol - the control to remove.
MessageException - if controls cannot be added to this Message or the control is
not known etc.public MessageTypeEnum getResponseType()
getResponseType in interface SingleReplyRequest<BindResponse>public BindResponse getResultResponse()
getResultResponse in interface ResultResponseRequest<BindResponse>public 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()public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||