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

java.lang.Object
  extended by org.apache.directory.shared.ldap.codec.decorators.MessageDecorator<M>
      extended by org.apache.directory.shared.ldap.codec.decorators.RequestDecorator<AbandonRequest>
          extended by org.apache.directory.shared.ldap.codec.decorators.AbandonRequestDecorator
All Implemented Interfaces:
Decorator<AbandonRequest>, AbandonRequest, Message, Request

public final class AbandonRequestDecorator
extends RequestDecorator<AbandonRequest>
implements AbandonRequest

A decorator for the AddRequest 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.AbandonRequest
TYPE
 
Constructor Summary
AbandonRequestDecorator(LdapCodecService codec, AbandonRequest decoratedMessage)
          Makes a AddRequest a MessageDecorator.
 
Method Summary
 int computeLength()
          Compute the AbandonRequest length AbandonRequest : 0x50 0x0(1..4) abandoned MessageId Length(AbandonRequest) = Length(0x50) + 1 + Length(abandoned MessageId)
 ByteBuffer encode(ByteBuffer buffer)
          Encode the Abandon protocolOp part
 int getAbandoned()
          
 void setAbandoned(int requestId)
          
 
Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.RequestDecorator
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.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
 

Constructor Detail

AbandonRequestDecorator

public AbandonRequestDecorator(LdapCodecService codec,
                               AbandonRequest decoratedMessage)
Makes a AddRequest a MessageDecorator.

Parameters:
decoratedMessage - the decorated AddRequest
Method Detail

getAbandoned

public int getAbandoned()

Specified by:
getAbandoned in interface AbandonRequest

setAbandoned

public void setAbandoned(int requestId)

Specified by:
setAbandoned in interface AbandonRequest

encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws EncoderException
Encode the Abandon protocolOp part

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

computeLength

public int computeLength()
Compute the AbandonRequest length AbandonRequest : 0x50 0x0(1..4) abandoned MessageId Length(AbandonRequest) = Length(0x50) + 1 + Length(abandoned MessageId)

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


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