public class BindResponseDecorator extends ResponseDecorator<BindResponse> implements BindResponse
messageLength
Constructor and Description |
---|
BindResponseDecorator(LdapApiService codec,
BindResponse decoratedMessage)
Makes a BindResponse a MessageDecorator.
|
Modifier and Type | Method and Description |
---|---|
int |
computeLength()
Compute the BindResponse length
BindResponse :
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the BindResponse message to a PDU.
|
int |
getBindResponseLength() |
byte[] |
getServerSaslCreds()
Gets the optional property holding SASL authentication response parameters
that are SASL mechanism specific.
|
void |
setBindResponseLength(int bindResponseLength)
Stores the encoded length for the BindResponse
|
void |
setServerSaslCreds(byte[] serverSaslCreds)
Sets the optional property holding SASL authentication response paramters
that are SASL mechanism specific.
|
getLdapResult, setLdapResult
addAllControls, addControl, get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, removeControl, setControlsLength, setMessageId, setMessageLength, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLdapResult
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
public BindResponseDecorator(LdapApiService codec, BindResponse decoratedMessage)
decoratedMessage
- the decorated BindResponsepublic void setBindResponseLength(int bindResponseLength)
bindResponseLength
- The encoded lengthpublic int getBindResponseLength()
public byte[] getServerSaslCreds()
getServerSaslCreds
in interface BindResponse
public void setServerSaslCreds(byte[] serverSaslCreds)
setServerSaslCreds
in interface BindResponse
serverSaslCreds
- the sasl auth. mech. specific credentialspublic int computeLength()
0x61 L1 | +--> LdapResult +--> [serverSaslCreds] L1 = Length(LdapResult) [ + Length(serverSaslCreds) ] Length(BindResponse) = Length(0x61) + Length(L1) + L1
computeLength
in interface Asn1Object
computeLength
in interface Decorator<BindResponse>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
LdapResult.encode [0x87 LL serverSaslCreds]
encode
in interface Asn1Object
encode
in interface Decorator<BindResponse>
bb
- The buffer where to put the PDUbindResponseDecorator
- The decorated BindResponse to encodeEncoderException
- when encoding operations failCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.