Class UnbindRequestDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.MessageDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.RequestDecorator<UnbindRequest>
-
- org.apache.directory.api.ldap.codec.decorators.UnbindRequestDecorator
-
- All Implemented Interfaces:
Asn1Object
,Decorator<UnbindRequest>
,Message
,Request
,UnbindRequest
public class UnbindRequestDecorator extends RequestDecorator<UnbindRequest> implements UnbindRequest
A decorator for the LdapResultResponse message- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description UnbindRequestDecorator(LdapApiService codec, UnbindRequest decoratedMessage)
Makes Request a MessageDecorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnbindRequest
addAllControls(Control[] controls)
Adds an array of controls to this Message.UnbindRequest
addControl(Control control)
Adds a control to this Message.int
computeLength()
Compute the UnBindRequest length
UnBindRequest :ByteBuffer
encode(ByteBuffer buffer)
Encode the Unbind protocolOp partUnbindRequest
removeControl(Control control)
Deletes a control removing it from this Message.UnbindRequest
setMessageId(int messageId)
Sets the Message ID for this request-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.RequestDecorator
hasResponse
-
Methods inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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.Request
hasResponse
-
-
-
-
Constructor Detail
-
UnbindRequestDecorator
public UnbindRequestDecorator(LdapApiService codec, UnbindRequest decoratedMessage)
Makes Request a MessageDecorator.- Parameters:
codec
- The LDAP service instancedecoratedMessage
- the decorated message
-
-
Method Detail
-
setMessageId
public UnbindRequest setMessageId(int messageId)
Sets the Message ID for this request- Specified by:
setMessageId
in interfaceMessage
- Specified by:
setMessageId
in interfaceUnbindRequest
- Overrides:
setMessageId
in classMessageDecorator<UnbindRequest>
- Parameters:
messageId
- The message Id- Returns:
- A Message reference
-
addControl
public UnbindRequest addControl(Control control)
Adds a control to this Message.- Specified by:
addControl
in interfaceMessage
- Specified by:
addControl
in interfaceUnbindRequest
- Overrides:
addControl
in classMessageDecorator<UnbindRequest>
- Parameters:
control
- the control to add.- Returns:
- A Message reference
-
addAllControls
public UnbindRequest addAllControls(Control[] controls)
Adds an array of controls to this Message.- Specified by:
addAllControls
in interfaceMessage
- Specified by:
addAllControls
in interfaceUnbindRequest
- Overrides:
addAllControls
in classMessageDecorator<UnbindRequest>
- Parameters:
controls
- the controls to add.- Returns:
- A Message reference
-
removeControl
public UnbindRequest removeControl(Control control)
Deletes a control removing it from this Message.- Specified by:
removeControl
in interfaceMessage
- Specified by:
removeControl
in interfaceUnbindRequest
- Overrides:
removeControl
in classMessageDecorator<UnbindRequest>
- Parameters:
control
- the control to remove.- Returns:
- A Message reference
-
computeLength
public int computeLength()
Compute the UnBindRequest length
UnBindRequest :0x42 00
- Specified by:
computeLength
in interfaceAsn1Object
- Returns:
- The object's computed length
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the Unbind protocolOp part- Specified by:
encode
in interfaceAsn1Object
- Parameters:
buffer
- The buffer where to put the PDU- Returns:
- The encoded PDU.
- Throws:
EncoderException
- if the buffer can't be encoded
-
-