org.apache.directory.shared.ldap.codec.extended
Class ExtendedRequest

java.lang.Object
  extended byorg.apache.directory.shared.asn1.Asn1Object
      extended byorg.apache.directory.shared.ldap.codec.LdapMessage
          extended byorg.apache.directory.shared.ldap.codec.extended.ExtendedRequest

public class ExtendedRequest
extends LdapMessage

A ExtendedRequest Message. Its syntax is : ExtendedRequest ::= [APPLICATION 23] SEQUENCE { requestName [0] LDAPOID, requestValue [1] OCTET STRING OPTIONAL }

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.asn1.Asn1Object
parent
 
Constructor Summary
ExtendedRequest()
          Creates a new ExtendedRequest object.
 
Method Summary
 int computeLength()
          Compute the ExtendedRequest length ExtendedRequest : 0x77 L1 | +--> 0x80 L2 name [+--> 0x81 L3 value] L1 = Length(0x80) + Length(L2) + L2 [+ Length(0x81) + Length(L3) + L3] Length(ExtendedRequest) = Length(0x77) + Length(L1) + L1
 java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
          Encode the ExtendedRequest message to a PDU.
 int getMessageType()
          Get the message type
 java.lang.String getRequestName()
          Get the extended request name
 byte[] getRequestValue()
          Get the extended request value
 void setRequestName(org.apache.directory.shared.asn1.primitives.OID requestName)
          Set the extended request name
 void setRequestValue(byte[] requestValue)
          Set the extended request value
 java.lang.String toString()
          Get a String representation of an Extended Request
 
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapMessage
addControl, getAbandonRequest, getAddRequest, getAddResponse, getBindRequest, getBindResponse, getCompareRequest, getCompareResponse, getControls, getControls, getCurrentControl, getDelRequest, getDelResponse, getExtendedRequest, getExtendedResponse, getLdapResponse, getMessageId, getMessageTypeName, getModifyDNRequest, getModifyDNResponse, getModifyRequest, getModifyResponse, getSearchRequest, getSearchResultDone, getSearchResultEntry, getSearchResultReference, getUnBindRequest, initControl, setMessageId, setProtocolOP
 
Methods inherited from class org.apache.directory.shared.asn1.Asn1Object
addLength, getCurrentLength, getExpectedLength, getParent, setCurrentLength, setExpectedLength, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendedRequest

public ExtendedRequest()
Creates a new ExtendedRequest object.

Method Detail

getMessageType

public int getMessageType()
Get the message type

Overrides:
getMessageType in class LdapMessage
Returns:
Returns the type.

getRequestName

public java.lang.String getRequestName()
Get the extended request name

Returns:
Returns the request name.

setRequestName

public void setRequestName(org.apache.directory.shared.asn1.primitives.OID requestName)
Set the extended request name

Parameters:
requestName - The request name to set.

getRequestValue

public byte[] getRequestValue()
Get the extended request value

Returns:
Returns the request value.

setRequestValue

public void setRequestValue(byte[] requestValue)
Set the extended request value

Parameters:
requestValue - The request value to set.

computeLength

public int computeLength()
Compute the ExtendedRequest length ExtendedRequest : 0x77 L1 | +--> 0x80 L2 name [+--> 0x81 L3 value] L1 = Length(0x80) + Length(L2) + L2 [+ Length(0x81) + Length(L3) + L3] Length(ExtendedRequest) = Length(0x77) + Length(L1) + L1

Overrides:
computeLength in class LdapMessage

encode

public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
                           throws org.apache.directory.shared.asn1.codec.EncoderException
Encode the ExtendedRequest message to a PDU. ExtendedRequest : 0x80 LL resquest name [0x81 LL request value]

Overrides:
encode in class LdapMessage
Parameters:
buffer - The buffer where to put the PDU
Returns:
The PDU.
Throws:
org.apache.directory.shared.asn1.codec.EncoderException - If anything goes wrong.

toString

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

Overrides:
toString in class LdapMessage
Returns:
an Extended Request String


Copyright © 2003-2006 . All Rights Reserved.