Class AbandonRequestImpl

All Implemented Interfaces:
AbandonRequest, Message, Request

public class AbandonRequestImpl extends AbstractRequest implements AbandonRequest
Implementation of an AbandonRequest message.
Author:
Apache Directory Project
  • Constructor Details

    • 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 Details

    • 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)
      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
    • addAllControls

      public AbandonRequest addAllControls(Control[] controls)
      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
    • removeControl

      public AbandonRequest removeControl(Control control)
      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
    • 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:
    • toString

      public String toString()
      Return a String representing an AbandonRequest
      Overrides:
      toString in class Object
      Returns:
      A String representing the AbandonRequest