Class DeleteRequestImpl

All Implemented Interfaces:
AbandonableRequest, DeleteRequest, Message, Request, ResultResponseRequest, SingleReplyRequest

public class DeleteRequestImpl extends AbstractAbandonableRequest implements DeleteRequest
Delete request implementation.
Author:
Apache Directory Project
  • Constructor Details

    • DeleteRequestImpl

      public DeleteRequestImpl()
      Creates a DeleteRequest implementing object used to delete a leaf entry from the DIT.
  • Method Details

    • getName

      public Dn getName()
      Gets the distinguished name of the leaf entry to be deleted by this request.
      Specified by:
      getName in interface DeleteRequest
      Returns:
      the Dn of the leaf entry to delete.
    • setName

      public DeleteRequest setName(Dn name)
      Sets the distinguished name of the leaf entry to be deleted by this request.
      Specified by:
      setName in interface DeleteRequest
      Parameters:
      name - the Dn of the leaf entry to delete.
      Returns:
      The DeleteRequest instance
    • setMessageId

      public DeleteRequest setMessageId(int messageId)
      Sets the Message ID for this request
      Specified by:
      setMessageId in interface DeleteRequest
      Specified by:
      setMessageId in interface Message
      Overrides:
      setMessageId in class AbstractMessage
      Parameters:
      messageId - The message Id
      Returns:
      A Message reference
    • addControl

      public DeleteRequest addControl(Control control)
      Adds a control to this Message.
      Specified by:
      addControl in interface DeleteRequest
      Specified by:
      addControl in interface Message
      Overrides:
      addControl in class AbstractMessage
      Parameters:
      control - the control to add.
      Returns:
      A Message reference
    • addAllControls

      public DeleteRequest addAllControls(Control[] controls)
      Adds an array of controls to this Message.
      Specified by:
      addAllControls in interface DeleteRequest
      Specified by:
      addAllControls in interface Message
      Overrides:
      addAllControls in class AbstractMessage
      Parameters:
      controls - the controls to add.
      Returns:
      A Message reference
    • removeControl

      public DeleteRequest removeControl(Control control)
      Deletes a control removing it from this Message.
      Specified by:
      removeControl in interface DeleteRequest
      Specified by:
      removeControl in interface Message
      Overrides:
      removeControl in class AbstractMessage
      Parameters:
      control - the control to remove.
      Returns:
      A Message reference
    • getResponseType

      public MessageTypeEnum getResponseType()
      Gets the protocol response message type for this request which produces at least one response.
      Specified by:
      getResponseType in interface SingleReplyRequest
      Returns:
      the message type of the response.
    • getResultResponse

      public DeleteResponse getResultResponse()
      The result containing response for this request.
      Specified by:
      getResultResponse in interface ResultResponseRequest
      Returns:
      the result containing response for this request
    • hashCode

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

      public boolean equals(Object obj)
      Checks to see if an object is equivalent to this DeleteRequest. First there's a quick test to see if the obj is the same object as this one - if so true is returned. Next if the super method fails false is returned. Then the name of the entry is compared - if not the same false is returned. Finally the method exists returning true.
      Overrides:
      equals in class AbstractRequest
      Parameters:
      obj - the object to test for equality to this
      Returns:
      true if the obj is equal to this DeleteRequest, false otherwise
    • toString

      public String toString()
      Return a String representing a DelRequest
      Overrides:
      toString in class Object
      Returns:
      A DelRequest String