org.apache.directory.shared.ldap.codec.decorators
Class AddResponseDecorator
java.lang.Object
org.apache.directory.shared.ldap.codec.decorators.MessageDecorator<M>
org.apache.directory.shared.ldap.codec.decorators.ResponseDecorator<AddResponse>
org.apache.directory.shared.ldap.codec.decorators.AddResponseDecorator
- All Implemented Interfaces:
- Decorator<AddResponse>, AddResponse, Message, Response, ResultResponse
public class AddResponseDecorator
- extends ResponseDecorator<AddResponse>
- implements AddResponse
A decorator for the AddResponse message
- Author:
- Apache Directory Project
| Fields inherited from interface org.apache.directory.shared.ldap.model.message.AddResponse |
TYPE |
| 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 interface org.apache.directory.shared.ldap.model.message.Message |
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId |
AddResponseDecorator
public AddResponseDecorator(LdapCodecService codec,
AddResponse decoratedMessage)
- Makes a AddResponse a MessageDecorator.
- Parameters:
decoratedMessage - the decorated AddResponse
getAddResponse
public AddResponse getAddResponse()
- Returns:
- The decorated AddResponse
setAddResponseLength
public void setAddResponseLength(int addResponseLength)
- Stores the encoded length for the AddResponse
- Parameters:
addResponseLength - The encoded length
getAddResponseLength
public int getAddResponseLength()
- Returns:
- The encoded AddResponse's length
computeLength
public int computeLength()
- Compute the AddResponse length
AddResponse :
0x69 L1
|
+--> LdapResult
L1 = Length(LdapResult)
Length(AddResponse) = Length(0x69) + Length(L1) + L1
- Specified by:
computeLength in interface Decorator<AddResponse>
- Returns:
- The object's computed length
encode
public ByteBuffer encode(ByteBuffer buffer)
throws EncoderException
- Encode the AddResponse message to a PDU.
- Specified by:
encode in interface Decorator<AddResponse>
- Parameters:
buffer - The buffer where to put the PDUaddResponseDecorator - the AddResponse decorator
- Returns:
- The PDU.
- Throws:
EncoderException - if the buffer can't be encoded
Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.