org.apache.directory.api.ldap.model.message
Class AbandonRequestImpl

java.lang.Object
  extended by org.apache.directory.api.ldap.model.message.AbstractMessage
      extended by org.apache.directory.api.ldap.model.message.AbstractRequest
          extended by org.apache.directory.api.ldap.model.message.AbandonRequestImpl
All Implemented Interfaces:
AbandonRequest, Message, Request

public class AbandonRequestImpl
extends AbstractRequest
implements AbandonRequest

Implementation of an AbandonRequest message.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
controls
 
Fields inherited from interface org.apache.directory.api.ldap.model.message.AbandonRequest
TYPE
 
Constructor Summary
AbandonRequestImpl()
          Creates an AbandonRequest implementation for an outstanding request.
AbandonRequestImpl(int abdandonnedId)
          Creates an AbandonRequest implementation for an outstanding request.
 
Method Summary
 void abandon()
          RFC 2251 [Section 4.11]: Abandon, Bind, Unbind, and StartTLS operations cannot be abandoned.
 AbandonRequest addAllControls(Control[] controls)
          Adds an array of controls to this Message.
 AbandonRequest addControl(Control control)
          Adds a control to this Message.
 boolean equals(Object obj)
          Checks for equality first by asking the super method which should compare all but the Abandoned request's Id.
 int getAbandoned()
          Gets the id of the request operation to terminate.
 int hashCode()
           
 AbandonRequest removeControl(Control control)
          Deletes a control removing it from this Message.
 AbandonRequest setAbandoned(int abandonId)
          Sets the id of the request operation to terminate.
 AbandonRequest setMessageId(int messageId)
          Sets the Message ID for this request
 String toString()
          Return a String representing an AbandonRequest
 
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractRequest
hasResponse
 
Methods inherited from class org.apache.directory.api.ldap.model.message.AbstractMessage
get, getControl, getControls, getMessageId, getType, hasControl, put, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, 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, getType, hasControl, put
 

Constructor Detail

AbandonRequestImpl

public AbandonRequestImpl()
Creates an AbandonRequest implementation for an outstanding request.


AbandonRequestImpl

public AbandonRequestImpl(int abdandonnedId)
Creates an AbandonRequest implementation for an outstanding request.

Parameters:
abdandonnedId - the sequence identifier of the AbandonRequest message.
Method Detail

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 abandonId)
Sets the id of the request operation to terminate.

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

abandon

public void abandon()
RFC 2251 [Section 4.11]: Abandon, Bind, Unbind, and StartTLS operations cannot be abandoned.


setMessageId

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

Specified by:
setMessageId in interface Message
Overrides:
setMessageId in class AbstractMessage
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 AbstractMessage
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 AbstractMessage
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 AbstractMessage
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.

equals

public boolean equals(Object obj)
Checks for equality first by asking the super method which should compare all but the Abandoned request's Id. It then compares this to determine equality.

Overrides:
equals in class AbstractRequest
Parameters:
obj - the object to test for equality to this AbandonRequest
Returns:
true if the obj equals this request, false otherwise

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractRequest
Returns:
the instance's hash code
See Also:
Object.hashCode()

toString

public String toString()
Return a String representing an AbandonRequest

Overrides:
toString in class Object
Returns:
A String representing the AbandonRequest


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