Interface BindResult

All Superinterfaces:
Response, Result

public interface BindResult extends Result
A Bind result indicates the status of the client's request for authentication.

A successful Bind operation is indicated by a Bind result with a result code set to ResultCode.SUCCESS and can be determined by invoking the isSuccess() method.

The server SASL credentials field is used as part of a SASL-defined bind mechanism to allow the client to authenticate the server to which it is communicating, or to perform "challenge-response" authentication. If the client bound using a form of simple authentication, or the SASL mechanism does not require the server to return information to the client, then this field shall not be included in the Bind result.

If the server requires the client to send a new SASL Bind request in order to continue the authentication process then the result code is set to ResultCode.SASL_BIND_IN_PROGRESS and can be determined by invoking the isSASLBindInProgress() method.

  • Method Details

    • addControl

      Description copied from interface: Response
      Adds the provided control to this response.
      Specified by:
      addControl in interface Response
      Specified by:
      addControl in interface Result
      Parameters:
      control - The control to be added.
      Returns:
      This response.
    • addReferralURI

      Description copied from interface: Result
      Adds the provided referral URI to this result.
      Specified by:
      addReferralURI in interface Result
      Parameters:
      uri - The referral URI to be added.
      Returns:
      This result.
    • getCause

      Description copied from interface: Result
      Returns the throwable cause associated with this result if available. A cause may be provided in cases where a result indicates a failure due to a client-side error.
      Specified by:
      getCause in interface Result
      Returns:
      The throwable cause, or null if none was provided.
    • getControl

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

      Description copied from interface: Response
      Returns a List containing the controls included with this response. The returned List may be modified if permitted by this response.
      Specified by:
      getControls in interface Response
      Specified by:
      getControls in interface Result
      Returns:
      A List containing the controls.
    • getDiagnosticMessage

      Description copied from interface: Result
      Returns the diagnostic message associated with this result.
      Specified by:
      getDiagnosticMessage in interface Result
      Returns:
      The diagnostic message, which may be empty if none was provided (never null).
    • getMatchedDN

      Description copied from interface: Result
      Returns the matched DN associated with this result.
      Specified by:
      getMatchedDN in interface Result
      Returns:
      The matched DN, which may be empty if none was provided (never null).
    • getReferralURIs

      Description copied from interface: Result
      Returns a List containing the referral URIs included with this result. The returned List may be modified if permitted by this result.
      Specified by:
      getReferralURIs in interface Result
      Returns:
      A List containing the referral URIs.
    • getResultCode

      Description copied from interface: Result
      Returns the result code associated with this result.
      Specified by:
      getResultCode in interface Result
      Returns:
      The result code.
    • getServerSASLCredentials

      Returns the server SASL credentials associated with this bind result.
      Returns:
      The server SASL credentials, or null indicating that none was provided.
    • isReferral

      boolean isReferral()
      Description copied from interface: Result
      Indicates whether a referral needs to be chased in order to complete the operation.

      Specifically, this method returns true if the result code is equal to ResultCode.REFERRAL.

      Specified by:
      isReferral in interface Result
      Returns:
      true if a referral needs to be chased, otherwise false.
    • isSASLBindInProgress

      Indicates whether the server requires the client to send a new SASL Bind request with the same SASL mechanism in order to continue the authentication process. This typically occurs during multi-stage (challenge response) authentication.

      Specifically, this method returns true if the result code is equal to ResultCode.SASL_BIND_IN_PROGRESS.

      Returns:
      true if the server requires the client to send a new SASL Bind request, otherwise false.
    • isSuccess

      boolean isSuccess()
      Description copied from interface: Result
      Indicates whether the request succeeded or not. This method will return {code true} for all non-error responses.
      Specified by:
      isSuccess in interface Result
      Returns:
      true if the request succeeded, otherwise false.
    • setCause

      Description copied from interface: Result
      Sets the throwable cause associated with this result if available. A cause may be provided in cases where a result indicates a failure due to a client-side error.
      Specified by:
      setCause in interface Result
      Parameters:
      cause - The throwable cause, which may be null indicating that none was provided.
      Returns:
      This result.
    • setDiagnosticMessage

      Description copied from interface: Result
      Sets the diagnostic message associated with this result.
      Specified by:
      setDiagnosticMessage in interface Result
      Parameters:
      message - The diagnostic message, which may be empty or null indicating that none was provided.
      Returns:
      This result.
    • setMatchedDN

      Description copied from interface: Result
      Sets the matched DN associated with this result.
      Specified by:
      setMatchedDN in interface Result
      Parameters:
      dn - The matched DN associated, which may be empty or null indicating that none was provided.
      Returns:
      This result.
    • setResultCode

      Description copied from interface: Result
      Sets the result code associated with this result.
      Specified by:
      setResultCode in interface Result
      Parameters:
      resultCode - The result code.
      Returns:
      This result.
    • setServerSASLCredentials

      Sets the server SASL credentials associated with this bind result.
      Parameters:
      credentials - The server SASL credentials associated with this bind result, which may be null indicating that none was provided.
      Returns:
      This bind result.
      Throws:
      UnsupportedOperationException - If this bind result does not permit the server SASL credentials to be set.