Class AbstractResultResponseRequestDsml<E extends ResultResponseRequest,F extends ResultResponse>
- java.lang.Object
-
- org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator<E>
-
- org.apache.directory.api.dsmlv2.request.AbstractRequestDsml<E>
-
- org.apache.directory.api.dsmlv2.request.AbstractResultResponseRequestDsml<E,F>
-
- Type Parameters:
E- The response request result typeF- The response result type
- All Implemented Interfaces:
DsmlDecorator<E>,AbandonableRequest,Message,Request,ResultResponseRequest
- Direct Known Subclasses:
AddRequestDsml,BindRequestDsml,CompareRequestDsml,DelRequestDsml,ExtendedRequestDsml,ModifyDNRequestDsml,ModifyRequestDsml,SearchRequestDsml
public abstract class AbstractResultResponseRequestDsml<E extends ResultResponseRequest,F extends ResultResponse> extends AbstractRequestDsml<E> implements ResultResponseRequest, AbandonableRequest
Abstract class for DSML requests.- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description AbstractResultResponseRequestDsml(LdapApiService codec, E ldapMessage)Creates a new instance of AbstractRequestDsml.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabandon()Abandons this request.AbandonableRequestaddAbandonListener(AbandonListener listener)Adds listener to be notified if this request gets abandoned.intcomputeLength()ByteBufferencode(ByteBuffer buffer)Encode the request.ResultResponsegetResultResponse()If called for the first time, this method creates a result containing response object for this request.booleanisAbandoned()Checks to see if this request has been abandoned.ElementtoDsml(Element root)Creates the Request Element and adds RequestID and Controls.-
Methods inherited from class org.apache.directory.api.dsmlv2.request.AbstractRequestDsml
getRequestName, hasResponse
-
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
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
-
-
-
-
Constructor Detail
-
AbstractResultResponseRequestDsml
public AbstractResultResponseRequestDsml(LdapApiService codec, E ldapMessage)
Creates a new instance of AbstractRequestDsml.- Parameters:
codec- The LDAP Service to useldapMessage- the message to decorate
-
-
Method Detail
-
toDsml
public Element toDsml(Element root)
Creates the Request Element and adds RequestID and Controls.- Specified by:
toDsmlin interfaceDsmlDecorator<E extends ResultResponseRequest>- Overrides:
toDsmlin classAbstractRequestDsml<E extends ResultResponseRequest>- Parameters:
root- the root element- Returns:
- the Request Element of the given name containing
-
computeLength
public int computeLength()
- Overrides:
computeLengthin classAbstractRequestDsml<E extends ResultResponseRequest>- Returns:
- the buffer's length (always 0)
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the request. Always return an empty buffer.- Overrides:
encodein classAbstractRequestDsml<E extends ResultResponseRequest>- Parameters:
buffer- The buffer to allocate- Returns:
- The resulting buffer
- Throws:
EncoderException- If we had an error while encoding the request
-
getResultResponse
public ResultResponse getResultResponse()
If called for the first time, this method creates a result containing response object for this request.- Specified by:
getResultResponsein interfaceResultResponseRequest- Returns:
- a result containing response with defaults and the messageId set in response to this specific request
-
abandon
public void abandon()
Abandons this request.- Specified by:
abandonin interfaceAbandonableRequest
-
isAbandoned
public boolean isAbandoned()
Checks to see if this request has been abandoned.- Specified by:
isAbandonedin interfaceAbandonableRequest- Returns:
- true if the request has been abandoned.
-
addAbandonListener
public AbandonableRequest addAbandonListener(AbandonListener listener)
Adds listener to be notified if this request gets abandoned.- Specified by:
addAbandonListenerin interfaceAbandonableRequest- Parameters:
listener- to be notified if this request gets abandoned.- Returns:
- An AbandonableRequest reference
-
-