|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.shared.ldap.codec.decorators.MessageDecorator<M>
org.apache.directory.shared.ldap.codec.decorators.RequestDecorator<M>
org.apache.directory.shared.ldap.codec.decorators.ResultResponseRequestDecorator<M>
org.apache.directory.shared.ldap.codec.decorators.SingleReplyRequestDecorator<BindRequest>
org.apache.directory.shared.ldap.codec.decorators.BindRequestDecorator
public class BindRequestDecorator
A decorator for the BindRequest message
| Field Summary |
|---|
| Fields inherited from class org.apache.directory.shared.ldap.codec.decorators.MessageDecorator |
|---|
messageLength |
| Fields inherited from interface org.apache.directory.shared.ldap.model.message.BindRequest |
|---|
RESP_TYPE, TYPE |
| Constructor Summary | |
|---|---|
BindRequestDecorator(LdapCodecService codec,
BindRequest decoratedMessage)
Makes a BindRequest a MessageDecorator. |
|
| Method Summary | |
|---|---|
int |
computeLength()
Compute the BindRequest length BindRequest : |
ByteBuffer |
encode(ByteBuffer buffer)
Encode the BindRequest message to a PDU. |
int |
getBindRequestLength()
|
byte[] |
getCredentials()
|
Dn |
getName()
|
int |
getSaslCredentialsLength()
|
String |
getSaslMechanism()
|
int |
getSaslMechanismLength()
|
boolean |
getSimple()
|
boolean |
getVersion3()
|
boolean |
isSimple()
|
boolean |
isVersion3()
|
void |
setBindRequestLength(int bindRequestLength)
Stores the encoded length for the BindRequest |
void |
setCredentials(byte[] credentials)
|
void |
setCredentials(String credentials)
|
void |
setName(Dn name)
|
void |
setSaslCredentialsLength(int saslCredentialsLength)
Stores the encoded length for the SaslCredentials |
void |
setSaslMechanism(String saslMechanism)
|
void |
setSaslMechanismLength(int saslMechanismLength)
Stores the encoded length for the Mechanism |
void |
setSimple(boolean isSimple)
|
void |
setVersion3(boolean isVersion3)
|
| Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.SingleReplyRequestDecorator |
|---|
abandon, addAbandonListener, getResponseType, isAbandoned |
| Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.ResultResponseRequestDecorator |
|---|
getResultResponse, hasResponse |
| Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.MessageDecorator |
|---|
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.SingleReplyRequest |
|---|
getResponseType |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.ResultResponseRequest |
|---|
getResultResponse |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.Request |
|---|
hasResponse |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.Message |
|---|
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId |
| Methods inherited from interface org.apache.directory.shared.ldap.model.message.AbandonableRequest |
|---|
abandon, addAbandonListener, isAbandoned |
| Constructor Detail |
|---|
public BindRequestDecorator(LdapCodecService codec,
BindRequest decoratedMessage)
decoratedMessage - the decorated BindRequests.| Method Detail |
|---|
public void setBindRequestLength(int bindRequestLength)
bindRequestLength - The encoded lengthpublic int getBindRequestLength()
public void setSaslCredentialsLength(int saslCredentialsLength)
saslCredentialsLength - The encoded lengthpublic int getSaslCredentialsLength()
public void setSaslMechanismLength(int saslMechanismLength)
saslMechanismLength - The encoded lengthpublic int getSaslMechanismLength()
public boolean isSimple()
isSimple in interface BindRequestpublic boolean getSimple()
getSimple in interface BindRequestpublic void setSimple(boolean isSimple)
setSimple in interface BindRequestpublic byte[] getCredentials()
getCredentials in interface BindRequestpublic void setCredentials(String credentials)
setCredentials in interface BindRequestpublic void setCredentials(byte[] credentials)
setCredentials in interface BindRequestpublic Dn getName()
getName in interface BindRequestpublic void setName(Dn name)
setName in interface BindRequestpublic boolean isVersion3()
isVersion3 in interface BindRequestpublic boolean getVersion3()
getVersion3 in interface BindRequestpublic void setVersion3(boolean isVersion3)
setVersion3 in interface BindRequestpublic String getSaslMechanism()
getSaslMechanism in interface BindRequestpublic void setSaslMechanism(String saslMechanism)
setSaslMechanism in interface BindRequestpublic int computeLength()
0x60 L1
|
+--> 0x02 0x01 (1..127) version
+--> 0x04 L2 name
+--> authentication
L2 = Length(name)
L3/4 = Length(authentication)
Length(BindRequest) = Length(0x60) + Length(L1) + L1 + Length(0x02) + 1 + 1 +
Length(0x04) + Length(L2) + L2 + Length(authentication)
computeLength in interface Decorator<BindRequest>
public ByteBuffer encode(ByteBuffer buffer)
throws EncoderException
0x60 LL
0x02 LL version 0x80 LL simple
0x04 LL name /
authentication.encode()
\ 0x83 LL mechanism [0x04 LL credential]
encode in interface Decorator<BindRequest>buffer - The buffer where to put the PDU
EncoderException - if the buffer can't be encoded
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||