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

java.lang.Object
  extended by org.apache.directory.shared.ldap.codec.decorators.MessageDecorator<IntermediateResponse>
      extended by org.apache.directory.shared.ldap.codec.decorators.IntermediateResponseDecorator
All Implemented Interfaces:
Decorator<IntermediateResponse>, IntermediateResponse, Message, Response

public class IntermediateResponseDecorator
extends MessageDecorator<IntermediateResponse>
implements IntermediateResponse

A decorator for the IntermediateResponse 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.IntermediateResponse
TYPE
 
Constructor Summary
IntermediateResponseDecorator(LdapCodecService codec, IntermediateResponse decoratedMessage)
          Makes a IntermediateResponse encodable.
 
Method Summary
 int computeLength()
          Compute the intermediateResponse length intermediateResponse : 0x79 L1 | [+--> 0x80 L2 name [+--> 0x81 L3 response]] L1 = [ + Length(0x80) + Length(L2) + L2 [ + Length(0x81) + Length(L3) + L3]] Length(IntermediateResponse) = Length(0x79) + Length(L1) + L1
 ByteBuffer encode(ByteBuffer buffer)
          Encode the IntermediateResponse message to a PDU.
 int getIntermediateResponseLength()
           
 String getResponseName()
          
 byte[] getResponseNameBytes()
          Gets the ResponseName bytes
 byte[] getResponseValue()
          
 void setIntermediateResponseLength(int intermediateResponseLength)
          Stores the encoded length for the IntermediateResponse
 void setResponseName(String oid)
          
 void setResponseNameBytes(byte[] responseNameBytes)
          Sets the ResponseName bytes
 void setResponseValue(byte[] value)
          
 
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.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
 

Constructor Detail

IntermediateResponseDecorator

public IntermediateResponseDecorator(LdapCodecService codec,
                                     IntermediateResponse decoratedMessage)
Makes a IntermediateResponse encodable.

Parameters:
decoratedMessage - the decorated IntermediateResponse
Method Detail

setIntermediateResponseLength

public void setIntermediateResponseLength(int intermediateResponseLength)
Stores the encoded length for the IntermediateResponse

Parameters:
intermediateResponseLength - The encoded length

getIntermediateResponseLength

public int getIntermediateResponseLength()
Returns:
The encoded IntermediateResponse's length

getResponseNameBytes

public byte[] getResponseNameBytes()
Gets the ResponseName bytes

Returns:
the ResponseName bytes of the Intermediate response type.

setResponseNameBytes

public void setResponseNameBytes(byte[] responseNameBytes)
Sets the ResponseName bytes

Parameters:
responseNameBytes - the ResponseName bytes of the Intermediate response type.

getResponseName

public String getResponseName()

Specified by:
getResponseName in interface IntermediateResponse

setResponseName

public void setResponseName(String oid)

Specified by:
setResponseName in interface IntermediateResponse

getResponseValue

public byte[] getResponseValue()

Specified by:
getResponseValue in interface IntermediateResponse

setResponseValue

public void setResponseValue(byte[] value)

Specified by:
setResponseValue in interface IntermediateResponse

computeLength

public int computeLength()
Compute the intermediateResponse length intermediateResponse : 0x79 L1 | [+--> 0x80 L2 name [+--> 0x81 L3 response]] L1 = [ + Length(0x80) + Length(L2) + L2 [ + Length(0x81) + Length(L3) + L3]] Length(IntermediateResponse) = Length(0x79) + Length(L1) + L1

Specified by:
computeLength in interface Decorator<IntermediateResponse>
Returns:
The IntermediateResponse length

encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws EncoderException
Encode the IntermediateResponse message to a PDU. IntermediateResponse : 0x79 LL [0x80 LL response name] [0x81 LL responseValue]

Specified by:
encode in interface Decorator<IntermediateResponse>
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.