org.apache.directory.api.dsmlv2.request
Class AbandonRequestDsml

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

public class AbandonRequestDsml
extends AbstractRequestDsml<AbandonRequest>
implements AbandonRequest

DSML Decorator for AbandonRequest

Author:
Apache Directory Project

Field Summary
 
Fields inherited from interface org.apache.directory.api.ldap.model.message.AbandonRequest
TYPE
 
Constructor Summary
AbandonRequestDsml(LdapApiService codec)
          Creates a new instance of AbandonRequestDsml.
AbandonRequestDsml(LdapApiService codec, AbandonRequest ldapMessage)
          Creates a new instance of AbandonRequestDsml.
 
Method Summary
 AbandonRequest addAllControls(Control[] controls)
          Adds an array of controls to this Message.
 AbandonRequest addControl(Control control)
          Adds a control to this Message.
 int getAbandoned()
          Gets the id of the request operation to terminate.
 int getAbandonedMessageId()
          Get the abandoned message ID
 MessageTypeEnum getType()
          Gets the LDAP message type code associated with this Message.
 AbandonRequest removeControl(Control control)
          Deletes a control removing it from this Message.
 AbandonRequest setAbandoned(int requestId)
          Sets the id of the request operation to terminate.
 AbandonRequest setAbandonedMessageId(int abandonedMessageId)
          Set the abandoned message ID
 AbandonRequest setMessageId(int messageId)
          Sets the Message ID for this request
 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.request.AbstractRequestDsml
computeLength, encode, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
 
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, hasControl, put
 

Constructor Detail

AbandonRequestDsml

public AbandonRequestDsml(LdapApiService codec)
Creates a new instance of AbandonRequestDsml.


AbandonRequestDsml

public AbandonRequestDsml(LdapApiService codec,
                          AbandonRequest ldapMessage)
Creates a new instance of AbandonRequestDsml.

Parameters:
ldapMessage - 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 interface Message
Overrides:
getType in class AbstractDsmlMessageDecorator<AbandonRequest>
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 interface DsmlDecorator<AbandonRequest>
Overrides:
toDsml in class AbstractRequestDsml<AbandonRequest>
Parameters:
root - the root element
Returns:
the Request Element of the given name containing

getAbandonedMessageId

public int getAbandonedMessageId()
Get the abandoned message ID

Returns:
Returns the abandoned MessageId.

setAbandonedMessageId

public AbandonRequest setAbandonedMessageId(int abandonedMessageId)
Set the abandoned message ID

Parameters:
abandonedMessageId - The abandoned messageID to set.

getAbandoned

public int getAbandoned()
Gets the id of the request operation to terminate.

Specified by:
getAbandoned in interface AbandonRequest
Returns:
the id of the request message to abandon

setAbandoned

public AbandonRequest setAbandoned(int requestId)
Sets the id of the request operation to terminate.

Specified by:
setAbandoned in interface AbandonRequest
Parameters:
requestId - the sequence id of the request message to abandon
Returns:
The AbandonRequest instance

setMessageId

public AbandonRequest setMessageId(int messageId)
Sets the Message ID for this request

Specified by:
setMessageId in interface Message
Overrides:
setMessageId in class AbstractDsmlMessageDecorator<AbandonRequest>
Parameters:
messageId - The message Id
Returns:
A Message reference

addControl

public AbandonRequest addControl(Control control)
                          throws MessageException
Adds a control to this Message.

Specified by:
addControl in interface Message
Overrides:
addControl in class AbstractDsmlMessageDecorator<AbandonRequest>
Parameters:
control - the control to add.
Returns:
A Message reference
Throws:
MessageException - if controls cannot be added to this Message or the control is not known etc.

addAllControls

public AbandonRequest addAllControls(Control[] controls)
                              throws MessageException
Adds an array of controls to this Message.

Specified by:
addAllControls in interface Message
Overrides:
addAllControls in class AbstractDsmlMessageDecorator<AbandonRequest>
Parameters:
controls - the controls to add.
Returns:
A Message reference
Throws:
MessageException - if controls cannot be added to this Message or they are not known etc.

removeControl

public AbandonRequest removeControl(Control control)
                             throws MessageException
Deletes a control removing it from this Message.

Specified by:
removeControl in interface Message
Overrides:
removeControl in class AbstractDsmlMessageDecorator<AbandonRequest>
Parameters:
control - the control to remove.
Returns:
A Message reference
Throws:
MessageException - if controls cannot be added to this Message or the control is not known etc.


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