org.apache.directory.shared.ldap.codec.intermediate
Class IntermediateResponseCodec

java.lang.Object
  extended by org.apache.directory.shared.asn1.AbstractAsn1Object
      extended by org.apache.directory.shared.ldap.codec.LdapMessageCodec
          extended by org.apache.directory.shared.ldap.codec.LdapResponseCodec
              extended by org.apache.directory.shared.ldap.codec.intermediate.IntermediateResponseCodec
All Implemented Interfaces:
Asn1Object

public class IntermediateResponseCodec
extends LdapResponseCodec

A IntermediateResponse Message. Its syntax is : IntermediateResponse ::= [APPLICATION 25] SEQUENCE { responseName [0] LDAPOID OPTIONAL, responseValue [1] OCTET STRING OPTIONAL }

Version:
$Rev: 664290 $, $Date: 2008-06-07 08:28:06 +0200 (Sat, 07 Jun 2008) $,
Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.codec.LdapMessageCodec
ldapMessageLength
 
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
parent
 
Constructor Summary
IntermediateResponseCodec()
          Creates a new IntermediateResponse object.
 
Method Summary
protected  int computeLengthProtocolOp()
          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
protected  void encodeProtocolOp(java.nio.ByteBuffer buffer)
          Encode the IntermediateResponse message to a PDU.
 MessageTypeEnum getMessageType()
          Get the message type
 java.lang.String getMessageTypeName()
          Get the message type Name
 java.lang.String getResponseName()
          Get the intermediate response name
 byte[] getResponseValue()
          Get the intermediate response value
 void setResponseName(OID responseName)
          Set the intermediate response name
 void setResponseValue(byte[] responseValue)
          Set the intermediate response value
 java.lang.String toString()
          Get a String representation of an IntermediateResponse
 
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapResponseCodec
computeLdapResultLength, encode, getLdapResponseLength, getLdapResult, setLdapResult
 
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapMessageCodec
addControl, addControls, computeLength, encode, getCodecControl, getControls, getControls, getCurrentControl, getMessageId, initControls, setMessageId, toString
 
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntermediateResponseCodec

public IntermediateResponseCodec()
Creates a new IntermediateResponse object.

Method Detail

getMessageType

public MessageTypeEnum getMessageType()
Get the message type

Specified by:
getMessageType in class LdapMessageCodec
Returns:
Returns the type.

getMessageTypeName

public java.lang.String getMessageTypeName()
Get the message type Name

Specified by:
getMessageTypeName in class LdapMessageCodec
Returns:
The message type name

getResponseName

public java.lang.String getResponseName()
Get the intermediate response name

Returns:
Returns the name.

setResponseName

public void setResponseName(OID responseName)
Set the intermediate response name

Parameters:
responseName - The name to set.

getResponseValue

public byte[] getResponseValue()
Get the intermediate response value

Returns:
Returns the intermediate response value.

setResponseValue

public void setResponseValue(byte[] responseValue)
Set the intermediate response value

Parameters:
responseValue - The intermediate response value to set.

computeLengthProtocolOp

protected int computeLengthProtocolOp()
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:
computeLengthProtocolOp in class LdapMessageCodec
Returns:
The IntermediateResponse length

encodeProtocolOp

protected void encodeProtocolOp(java.nio.ByteBuffer buffer)
                         throws EncoderException
Encode the IntermediateResponse message to a PDU. IntermediateResponse : 0x79 LL [0x80 LL response name] [0x81 LL responseValue]

Specified by:
encodeProtocolOp in class LdapMessageCodec
Parameters:
buffer - The buffer where to put the PDU
Throws:
EncoderException

toString

public java.lang.String toString()
Get a String representation of an IntermediateResponse

Overrides:
toString in class LdapResponseCodec
Returns:
An IntermediateResponse String


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