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

java.lang.Object
  extended by org.apache.directory.shared.ldap.codec.decorators.MessageDecorator<M>
      extended by org.apache.directory.shared.ldap.codec.decorators.RequestDecorator<M>
          extended by org.apache.directory.shared.ldap.codec.decorators.ResultResponseRequestDecorator<M>
              extended by org.apache.directory.shared.ldap.codec.decorators.SingleReplyRequestDecorator<DeleteRequest>
                  extended by org.apache.directory.shared.ldap.codec.decorators.DeleteRequestDecorator
All Implemented Interfaces:
Decorator<DeleteRequest>, AbandonableRequest, DeleteRequest, Message, Request, ResultResponseRequest, SingleReplyRequest

public class DeleteRequestDecorator
extends SingleReplyRequestDecorator<DeleteRequest>
implements DeleteRequest

A decorator for the DeleteRequest 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.DeleteRequest
RESP_TYPE, TYPE
 
Constructor Summary
DeleteRequestDecorator(LdapCodecService codec, DeleteRequest decoratedMessage)
          Makes a DeleteRequest a MessageDecorator.
 
Method Summary
 int computeLength()
          Compute the DelRequest length DelRequest : 0x4A L1 entry L1 = Length(entry) Length(DelRequest) = Length(0x4A) + Length(L1) + L1
 ByteBuffer encode(ByteBuffer buffer)
          Encode the DelRequest message to a PDU.
 Dn getName()
          
 void setName(Dn name)
          
 
Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.SingleReplyRequestDecorator
abandon, addAbandonListener, getResponseType, isAbandoned
 
Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.ResultResponseRequestDecorator
getResultResponse, hasResponse
 
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.SingleReplyRequest
getResponseType
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.ResultResponseRequest
getResultResponse
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.Request
hasResponse
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.AbandonableRequest
abandon, addAbandonListener, isAbandoned
 

Constructor Detail

DeleteRequestDecorator

public DeleteRequestDecorator(LdapCodecService codec,
                              DeleteRequest decoratedMessage)
Makes a DeleteRequest a MessageDecorator.

Parameters:
decoratedMessage - the decorated DeleteRequest
Method Detail

getName

public Dn getName()

Specified by:
getName in interface DeleteRequest

setName

public void setName(Dn name)

Specified by:
setName in interface DeleteRequest

computeLength

public int computeLength()
Compute the DelRequest length DelRequest : 0x4A L1 entry L1 = Length(entry) Length(DelRequest) = Length(0x4A) + Length(L1) + L1

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

encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws EncoderException
Encode the DelRequest message to a PDU. DelRequest : 0x4A LL entry

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