org.apache.directory.api.dsmlv2.request
Class AbstractRequestDsml<E extends Request>

java.lang.Object
  extended by org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator<E>
      extended by org.apache.directory.api.dsmlv2.request.AbstractRequestDsml<E>
All Implemented Interfaces:
DsmlDecorator<E>, Message, Request
Direct Known Subclasses:
AbandonRequestDsml, AbstractResultResponseRequestDsml

public abstract class AbstractRequestDsml<E extends Request>
extends AbstractDsmlMessageDecorator<E>
implements Request

Abstract class for DSML requests.

Author:
Apache Directory Project

Constructor Summary
AbstractRequestDsml(LdapApiService codec, E ldapMessage)
          Creates a new instance of AbstractRequestDsml.
 
Method Summary
 int computeLength()
           
 ByteBuffer encode(ByteBuffer buffer)
           
 boolean hasResponse()
          Tests to see if this Request produces one or more response types.
 org.dom4j.Element toDsml(org.dom4j.Element root)
          Creates the Request Element and adds RequestID and Controls.
 
Methods inherited from class org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator
addAllControls, addControl, get, getCodecService, getControl, getControls, getCurrentControl, getDecorated, getMessageId, getType, hasControl, put, removeControl, setMessageId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
addAllControls, addControl, get, getControl, getControls, getMessageId, getType, hasControl, put, removeControl, setMessageId
 

Constructor Detail

AbstractRequestDsml

public AbstractRequestDsml(LdapApiService codec,
                           E ldapMessage)
Creates a new instance of AbstractRequestDsml.

Parameters:
ldapMessage - the message to decorate
Method Detail

toDsml

public org.dom4j.Element toDsml(org.dom4j.Element root)
Creates the Request Element and adds RequestID and Controls.

Specified by:
toDsml in interface DsmlDecorator<E extends Request>
Parameters:
root - the root element
Returns:
the Request Element of the given name containing

computeLength

public int computeLength()

encode

public ByteBuffer encode(ByteBuffer buffer)
                  throws EncoderException
Throws:
EncoderException

hasResponse

public boolean hasResponse()
Tests to see if this Request produces one or more response types.

Specified by:
hasResponse in interface Request
Returns:
true if a response can be expected, false otherwise.


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