org.apache.directory.shared.ldap.codec.decorators
Class ModifyResponseDecorator

java.lang.Object
  extended by org.apache.directory.shared.ldap.codec.decorators.MessageDecorator<M>
      extended by org.apache.directory.shared.ldap.codec.decorators.ResponseDecorator<ModifyResponse>
          extended by org.apache.directory.shared.ldap.codec.decorators.ModifyResponseDecorator
All Implemented Interfaces:
Decorator<ModifyResponse>, Message, ModifyResponse, Response, ResultResponse

public class ModifyResponseDecorator
extends ResponseDecorator<ModifyResponse>
implements ModifyResponse

A decorator for the ModifyResponse message

Author:
Apache Directory Project

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.ModifyResponse
TYPE
 
Constructor Summary
ModifyResponseDecorator(LdapCodecService codec, ModifyResponse decoratedMessage)
          Makes a ModifyResponse encodable.
 
Method Summary
 int computeLength()
          Compute the ModifyResponse length ModifyResponse :
 ByteBuffer encode(ByteBuffer buffer)
          Encode the ModifyResponse message to a PDU.
 int getModifyResponseLength()
           
 void setModifyResponseLength(int modifyResponseLength)
          Stores the encoded length for the ModifyResponse
 
Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.ResponseDecorator
getLdapResult, setLdapResult
 
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.ResultResponse
getLdapResult
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
 

Constructor Detail

ModifyResponseDecorator

public ModifyResponseDecorator(LdapCodecService codec,
                               ModifyResponse decoratedMessage)
Makes a ModifyResponse encodable.

Parameters:
decoratedMessage - the decorated ModifyResponse
Method Detail

setModifyResponseLength

public void setModifyResponseLength(int modifyResponseLength)
Stores the encoded length for the ModifyResponse

Parameters:
modifyResponseLength - The encoded length

getModifyResponseLength

public int getModifyResponseLength()
Returns:
The encoded ModifyResponse's length

computeLength

public int computeLength()
Compute the ModifyResponse length ModifyResponse :
 0x67 L1 
   | 
   +--> LdapResult 
   
 L1 = Length(LdapResult) 
 Length(ModifyResponse) = Length(0x67) + Length(L1) + L1
 

Specified by:
computeLength in interface Decorator<ModifyResponse>
Returns:
The object's computed length

encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws EncoderException
Encode the ModifyResponse message to a PDU.

Specified by:
encode in interface Decorator<ModifyResponse>
Parameters:
buffer - The buffer where to put the PDU
Returns:
The PDU.
Throws:
EncoderException - if the buffer can't be encoded


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.