Interface Request

All Known Subinterfaces:
AbandonRequest, AddRequest, AnonymousSASLBindRequest, BindRequest, CancelExtendedRequest, ChangeRecord, CompareRequest, CRAMMD5SASLBindRequest, DeleteRequest, DigestMD5SASLBindRequest, ExtendedRequest<S>, ExternalSASLBindRequest, GenericBindRequest, GenericExtendedRequest, GSSAPISASLBindRequest, ModifyDNRequest, ModifyRequest, PasswordModifyExtendedRequest, PlainSASLBindRequest, SASLBindRequest, SearchRequest, SimpleBindRequest, StartTLSExtendedRequest, UnbindRequest, WhoAmIExtendedRequest
All Known Implementing Classes:
AbstractExtendedRequest

public interface Request
The base class of all Requests provides methods for querying and manipulating the set of Controls included with a Request.
  • Method Summary

    Modifier and Type
    Method
    Description
    Adds the provided control to this request.
    boolean
    Returns true if this request contains the specified request control.
    <C extends Control>
    C
    getControl(ControlDecoder<C> decoder, DecodeOptions options)
    Decodes and returns the first control in this request having an OID corresponding to the provided control decoder.
    Returns a List containing the controls included with this request.
  • Method Details

    • addControl

      Adds the provided control to this request.
      Parameters:
      control - The control to be added to this request.
      Returns:
      This request.
      Throws:
      UnsupportedOperationException - If this request does not permit controls to be added.
      NullPointerException - If control was null.
    • containsControl

      boolean containsControl(String oid)
      Returns true if this request contains the specified request control.
      Parameters:
      oid - The numeric OID of the request control.
      Returns:
      true if this request contains the specified request control.
    • getControl

      <C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) throws DecodeException
      Decodes and returns the first control in this request having an OID corresponding to the provided control decoder.
      Type Parameters:
      C - The type of control to be decoded and returned.
      Parameters:
      decoder - The control decoder.
      options - The set of decode options which should be used when decoding the control.
      Returns:
      The decoded control, or null if the control is not included with this request.
      Throws:
      DecodeException - If the control could not be decoded because it was malformed in some way (e.g. the control value was missing, or its content could not be decoded).
      NullPointerException - If decoder or options was null.
    • getControls

      Returns a List containing the controls included with this request. The returned List may be modified if permitted by this request.
      Returns:
      A List containing the controls.