org.apache.directory.shared.dsmlv2
Class LdapMessageDecorator

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.dsmlv2.LdapMessageDecorator
All Implemented Interfaces:
Asn1Object
Direct Known Subclasses:
LdapRequestDecorator, LdapResponseDecorator

public abstract class LdapMessageDecorator
extends LdapMessageCodec

Decorator class for LDAP Message. This is the top level class, the one that holds the instance.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Field Summary
protected  LdapMessageCodec instance
          The decorated instance
 
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
LdapMessageDecorator(LdapMessageCodec ldapMessage)
          Creates a new instance of LdapMessageDecorator.
 
Method Summary
 void addControl(Control control)
           
 void addLength(int length)
           
 int computeLength()
           
 int computeLengthProtocolOp()
           
 java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
           
 void encodeProtocolOp(java.nio.ByteBuffer buffer)
           
 AbandonRequestCodec getAbandonRequest()
           
 AddRequestCodec getAddRequest()
           
 AddResponseCodec getAddResponse()
           
 BindRequestCodec getBindRequest()
           
 BindResponseCodec getBindResponse()
           
 CompareRequestCodec getCompareRequest()
           
 CompareResponseCodec getCompareResponse()
           
 java.util.List<Control> getControls()
           
 Control getControls(int i)
           
 Control getCurrentControl()
           
 int getCurrentLength()
           
 DelRequestCodec getDelRequest()
           
 DelResponseCodec getDelResponse()
           
 int getExpectedLength()
           
 ExtendedRequestCodec getExtendedRequest()
           
 ExtendedResponseCodec getExtendedResponse()
           
 LdapResponseCodec getLdapResponse()
           
 int getMessageId()
           
 MessageTypeEnum getMessageType()
           
 java.lang.String getMessageTypeName()
           
 ModifyDNRequestCodec getModifyDNRequest()
           
 ModifyDNResponseCodec getModifyDNResponse()
           
 ModifyRequestCodec getModifyRequest()
           
 ModifyResponseCodec getModifyResponse()
           
 AbstractAsn1Object getParent()
           
 SearchRequestCodec getSearchRequest()
           
 SearchResultDoneCodec getSearchResultDone()
           
 SearchResultEntryCodec getSearchResultEntry()
           
 SearchResultReferenceCodec getSearchResultReference()
           
 UnBindRequestCodec getUnBindRequest()
           
 void setCurrentLength(int currentLength)
           
 void setExpectedLength(int expectedLength)
           
 void setMessageId(int messageId)
           
 void setParent(AbstractAsn1Object parent)
           
 java.lang.String toString()
           
 
Methods inherited from class org.apache.directory.shared.ldap.codec.LdapMessageCodec
addControls, encode, getCodecControl, initControls, toString
 
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object
getTlvId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

instance

protected LdapMessageCodec instance
The decorated instance

Constructor Detail

LdapMessageDecorator

public LdapMessageDecorator(LdapMessageCodec ldapMessage)
Creates a new instance of LdapMessageDecorator.

Parameters:
ldapMessage - the message to decorate
Method Detail

addControl

public void addControl(Control control)
Overrides:
addControl in class LdapMessageCodec

computeLength

public int computeLength()
Specified by:
computeLength in interface Asn1Object
Overrides:
computeLength in class LdapMessageCodec

computeLengthProtocolOp

public int computeLengthProtocolOp()
Specified by:
computeLengthProtocolOp in class LdapMessageCodec

encode

public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer)
                           throws EncoderException
Specified by:
encode in interface Asn1Object
Overrides:
encode in class AbstractAsn1Object
Throws:
EncoderException

encodeProtocolOp

public void encodeProtocolOp(java.nio.ByteBuffer buffer)
                      throws EncoderException
Specified by:
encodeProtocolOp in class LdapMessageCodec
Throws:
EncoderException

getAbandonRequest

public AbandonRequestCodec getAbandonRequest()

getAddRequest

public AddRequestCodec getAddRequest()

getAddResponse

public AddResponseCodec getAddResponse()

getBindRequest

public BindRequestCodec getBindRequest()

getBindResponse

public BindResponseCodec getBindResponse()

getCompareRequest

public CompareRequestCodec getCompareRequest()

getCompareResponse

public CompareResponseCodec getCompareResponse()

getControls

public java.util.List<Control> getControls()
Overrides:
getControls in class LdapMessageCodec

getControls

public Control getControls(int i)
Overrides:
getControls in class LdapMessageCodec

getCurrentControl

public Control getCurrentControl()
Overrides:
getCurrentControl in class LdapMessageCodec

getDelRequest

public DelRequestCodec getDelRequest()

getDelResponse

public DelResponseCodec getDelResponse()

getExtendedRequest

public ExtendedRequestCodec getExtendedRequest()

getExtendedResponse

public ExtendedResponseCodec getExtendedResponse()

getLdapResponse

public LdapResponseCodec getLdapResponse()

getMessageId

public int getMessageId()
Overrides:
getMessageId in class LdapMessageCodec

getMessageType

public MessageTypeEnum getMessageType()
Specified by:
getMessageType in class LdapMessageCodec

getMessageTypeName

public java.lang.String getMessageTypeName()
Specified by:
getMessageTypeName in class LdapMessageCodec

getModifyDNRequest

public ModifyDNRequestCodec getModifyDNRequest()

getModifyDNResponse

public ModifyDNResponseCodec getModifyDNResponse()

getModifyRequest

public ModifyRequestCodec getModifyRequest()

getModifyResponse

public ModifyResponseCodec getModifyResponse()

getSearchRequest

public SearchRequestCodec getSearchRequest()

getSearchResultDone

public SearchResultDoneCodec getSearchResultDone()

getSearchResultEntry

public SearchResultEntryCodec getSearchResultEntry()

getSearchResultReference

public SearchResultReferenceCodec getSearchResultReference()

getUnBindRequest

public UnBindRequestCodec getUnBindRequest()

setMessageId

public void setMessageId(int messageId)
Overrides:
setMessageId in class LdapMessageCodec

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addLength

public void addLength(int length)
               throws DecoderException
Specified by:
addLength in interface Asn1Object
Overrides:
addLength in class AbstractAsn1Object
Throws:
DecoderException

getCurrentLength

public int getCurrentLength()
Specified by:
getCurrentLength in interface Asn1Object
Overrides:
getCurrentLength in class AbstractAsn1Object

getExpectedLength

public int getExpectedLength()
Specified by:
getExpectedLength in interface Asn1Object
Overrides:
getExpectedLength in class AbstractAsn1Object

getParent

public AbstractAsn1Object getParent()
Specified by:
getParent in interface Asn1Object
Overrides:
getParent in class AbstractAsn1Object

setCurrentLength

public void setCurrentLength(int currentLength)
Specified by:
setCurrentLength in interface Asn1Object
Overrides:
setCurrentLength in class AbstractAsn1Object

setExpectedLength

public void setExpectedLength(int expectedLength)
Specified by:
setExpectedLength in interface Asn1Object
Overrides:
setExpectedLength in class AbstractAsn1Object

setParent

public void setParent(AbstractAsn1Object parent)
Overrides:
setParent in class AbstractAsn1Object


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