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

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

public class UnbindRequestDecorator
extends RequestDecorator<UnbindRequest>
implements UnbindRequest

A decorator for the LdapResultResponse 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.UnbindRequest
TYPE
 
Constructor Summary
UnbindRequestDecorator(LdapCodecService codec, UnbindRequest decoratedMessage)
          Makes Request a MessageDecorator.
 
Method Summary
 int computeLength()
          Compute the UnBindRequest length UnBindRequest : 0x42 00
 ByteBuffer encode(ByteBuffer buffer)
          Encode the Unbind protocolOp part
 
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

UnbindRequestDecorator

public UnbindRequestDecorator(LdapCodecService codec,
                              UnbindRequest decoratedMessage)
Makes Request a MessageDecorator.

Parameters:
decoratedMessage - the decorated message
Method Detail

computeLength

public int computeLength()
Compute the UnBindRequest length UnBindRequest : 0x42 00

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

encode

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

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