Interface Response

All Known Subinterfaces:
BindResult, CompareResult, ExtendedResult, GenericExtendedResult, GenericIntermediateResponse, IntermediateResponse, PasswordModifyExtendedResult, Result, SearchResultEntry, SearchResultReference, WhoAmIExtendedResult
All Known Implementing Classes:
AbstractExtendedResult, AbstractIntermediateResponse

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

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

    • addControl

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

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

      <C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) throws DecodeException
      Decodes and returns the first control in this response 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 response.
      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 response. The returned List may be modified if permitted by this response.
      Returns:
      A List containing the controls.