Class AbstractExtendedRequest<R extends ExtendedRequest<S>,S extends ExtendedResult>

java.lang.Object
org.forgerock.opendj.ldap.requests.AbstractExtendedRequest<R,S>
Type Parameters:
R - The type of extended request.
S - The type of result.
All Implemented Interfaces:
ExtendedRequest<S>, Request

public abstract class AbstractExtendedRequest<R extends ExtendedRequest<S>,S extends ExtendedResult> extends Object implements ExtendedRequest<S>
An abstract Extended request which can be used as the basis for implementing new Extended operations.
  • Constructor Details

  • Method Details

    • getOID

      public abstract String getOID()
      Description copied from interface: ExtendedRequest
      Returns the numeric OID associated with this extended request.
      Specified by:
      getOID in interface ExtendedRequest<R extends ExtendedRequest<S>>
      Returns:
      The numeric OID associated with this extended request.
    • getResultDecoder

      Description copied from interface: ExtendedRequest
      Returns a decoder which can be used to decoded responses to this extended request.
      Specified by:
      getResultDecoder in interface ExtendedRequest<R extends ExtendedRequest<S>>
      Returns:
      A decoder which can be used to decoded responses to this extended request.
    • getValue

      public abstract ByteString getValue()
      Description copied from interface: ExtendedRequest
      Returns the value, if any, associated with this extended request. Its format is defined by the specification of this extended request.
      Specified by:
      getValue in interface ExtendedRequest<R extends ExtendedRequest<S>>
      Returns:
      The value associated with this extended request, or null if there is no value.
    • hasValue

      public abstract boolean hasValue()
      Description copied from interface: ExtendedRequest
      Returns true if this extended request has a value. In some circumstances it may be useful to determine if a extended request has a value, without actually calculating the value and incurring any performance costs.
      Specified by:
      hasValue in interface ExtendedRequest<R extends ExtendedRequest<S>>
      Returns:
      true if this extended request has a value, or false if there is no value.
    • toString

      public String toString()
    • addControl

      public final R addControl(Control control)
      Description copied from interface: Request
      Adds the provided control to this request.
      Specified by:
      addControl in interface Request
      Parameters:
      control - The control to be added to this request.
      Returns:
      This request.
    • containsControl

      public boolean containsControl(String oid)
      Description copied from interface: Request
      Returns true if this request contains the specified request control.
      Specified by:
      containsControl in interface Request
      Parameters:
      oid - The numeric OID of the request control.
      Returns:
      true if this request contains the specified request control.
    • getControl

      public final <C extends Control> C getControl(ControlDecoder<C> decoder, DecodeOptions options) throws DecodeException
      Description copied from interface: Request
      Decodes and returns the first control in this request having an OID corresponding to the provided control decoder.
      Specified by:
      getControl in interface Request
      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).
    • getControls

      public final List<Control> getControls()
      Description copied from interface: Request
      Returns a List containing the controls included with this request. The returned List may be modified if permitted by this request.
      Specified by:
      getControls in interface Request
      Returns:
      A List containing the controls.