Class ExtendedRequestDsml<Q extends ExtendedRequest,P extends ExtendedResponse>
- 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<Q,P>
-
- org.apache.directory.api.dsmlv2.request.ExtendedRequestDsml<Q,P>
-
- Type Parameters:
Q
- The extended request typeP
- The extended response type
- All Implemented Interfaces:
DsmlDecorator<Q>
,AbandonableRequest
,ExtendedRequest
,Message
,Request
,ResultResponseRequest
,SingleReplyRequest
public class ExtendedRequestDsml<Q extends ExtendedRequest,P extends ExtendedResponse> extends AbstractResultResponseRequestDsml<Q,P> implements ExtendedRequest
DSML Decorator for ExtendedRequest- Author:
- Apache Directory Project
-
-
Constructor Summary
Constructors Constructor Description ExtendedRequestDsml(LdapApiService codec, Q ldapMessage)
Creates a new getDecoratedMessage() of ExtendedRequestDsml.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtendedRequest
addAllControls(Control[] controls)
Adds an array of controls to this Message.ExtendedRequest
addControl(Control control)
Adds a control to this Message.String
getRequestName()
Get the extended request namebyte[]
getRequestValue()
Get the extended request valueMessageTypeEnum
getResponseType()
Gets the protocol response message type for this request which produces at least one response.MessageTypeEnum
getType()
Gets the LDAP message type code associated with this Message.ExtendedRequest
removeControl(Control control)
Deletes a control removing it from this Message.ExtendedRequest
setMessageId(int messageId)
Sets the Message ID for this requestExtendedRequest
setRequestName(String oid)
Sets the Object Identifier corresponding to the extended request type.void
setRequestName(Oid requestName)
Set the extended request namevoid
setRequestValue(byte[] requestValue)
Set the extended request valueorg.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.request.AbstractResultResponseRequestDsml
abandon, addAbandonListener, computeLength, encode, getResultResponse, isAbandoned
-
Methods inherited from class org.apache.directory.api.dsmlv2.request.AbstractRequestDsml
hasResponse
-
Methods inherited from class org.apache.directory.api.dsmlv2.AbstractDsmlMessageDecorator
get, getCodecService, getControl, getControls, getCurrentControl, getDecorated, getMessageId, hasControl, put
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, hasControl, put
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest
getResultResponse
-
-
-
-
Constructor Detail
-
ExtendedRequestDsml
public ExtendedRequestDsml(LdapApiService codec, Q ldapMessage)
Creates a new getDecoratedMessage() of ExtendedRequestDsml.- Parameters:
codec
- The LDAP Service to useldapMessage
- the message to decorate
-
-
Method Detail
-
getType
public MessageTypeEnum getType()
Gets the LDAP message type code associated with this Message. Each request and response type has a unique message type code defined by the protocol in RFC 2251.- Specified by:
getType
in interfaceMessage
- Overrides:
getType
in classAbstractDsmlMessageDecorator<Q extends ExtendedRequest>
- Returns:
- the message type code.
-
toDsml
public org.dom4j.Element toDsml(org.dom4j.Element root)
Creates the Request Element and adds RequestID and Controls.- Specified by:
toDsml
in interfaceDsmlDecorator<Q extends ExtendedRequest>
- Overrides:
toDsml
in classAbstractResultResponseRequestDsml<Q extends ExtendedRequest,P extends ExtendedResponse>
- Parameters:
root
- the root element- Returns:
- the Request Element of the given name containing
-
getRequestName
public String getRequestName()
Get the extended request name- Specified by:
getRequestName
in interfaceExtendedRequest
- Returns:
- Returns the request name.
-
setRequestName
public void setRequestName(Oid requestName)
Set the extended request name- Parameters:
requestName
- The request name to set.
-
getRequestValue
public byte[] getRequestValue()
Get the extended request value- Returns:
- Returns the request value.
-
setRequestValue
public void setRequestValue(byte[] requestValue)
Set the extended request value- Parameters:
requestValue
- The request value to set.
-
getResponseType
public MessageTypeEnum getResponseType()
Gets the protocol response message type for this request which produces at least one response.- Specified by:
getResponseType
in interfaceSingleReplyRequest
- Returns:
- the message type of the response.
-
setRequestName
public ExtendedRequest setRequestName(String oid)
Sets the Object Identifier corresponding to the extended request type.- Specified by:
setRequestName
in interfaceExtendedRequest
- Parameters:
oid
- the dotted-decimal representation as a String of the OID- Returns:
- The ExtendedRequest instance
-
setMessageId
public ExtendedRequest setMessageId(int messageId)
Sets the Message ID for this request- Specified by:
setMessageId
in interfaceExtendedRequest
- Specified by:
setMessageId
in interfaceMessage
- Overrides:
setMessageId
in classAbstractDsmlMessageDecorator<Q extends ExtendedRequest>
- Parameters:
messageId
- The message Id- Returns:
- A Message reference
-
addControl
public ExtendedRequest addControl(Control control)
Adds a control to this Message.- Specified by:
addControl
in interfaceExtendedRequest
- Specified by:
addControl
in interfaceMessage
- Overrides:
addControl
in classAbstractDsmlMessageDecorator<Q extends ExtendedRequest>
- Parameters:
control
- the control to add.- Returns:
- A Message reference
-
addAllControls
public ExtendedRequest addAllControls(Control[] controls)
Adds an array of controls to this Message.- Specified by:
addAllControls
in interfaceExtendedRequest
- Specified by:
addAllControls
in interfaceMessage
- Overrides:
addAllControls
in classAbstractDsmlMessageDecorator<Q extends ExtendedRequest>
- Parameters:
controls
- the controls to add.- Returns:
- A Message reference
-
removeControl
public ExtendedRequest removeControl(Control control)
Deletes a control removing it from this Message.- Specified by:
removeControl
in interfaceExtendedRequest
- Specified by:
removeControl
in interfaceMessage
- Overrides:
removeControl
in classAbstractDsmlMessageDecorator<Q extends ExtendedRequest>
- Parameters:
control
- the control to remove.- Returns:
- A Message reference
-
-