Class LDAPRuntimeException

    • Constructor Summary

      Constructors 
      Constructor Description
      LDAPRuntimeException​(LDAPException ldapException)
      Creates a new instance of this LDAPRuntimeException using the provided LDAPException.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getDiagnosticMessage()
      Retrieves the diagnostic message returned by the directory server.
      java.lang.String getExceptionMessage()
      Retrieves a string representation of this exception suitable for use in messages.
      java.lang.String getExceptionMessage​(boolean includeStackTrace, boolean includeCause)
      Retrieves a string representation of this exception suitable for use in messages.
      LDAPException getLDAPException()
      Retrieves the LDAPException object wrapped by this runtime exception.
      java.lang.String getMatchedDN()
      Retrieves the matched DN for this LDAP exception.
      java.lang.String[] getReferralURLs()
      Retrieves the set of referral URLs for this LDAP exception.
      Control getResponseControl​(java.lang.String oid)
      Retrieves the response control with the specified OID.
      Control[] getResponseControls()
      Retrieves the set of response controls for this LDAP exception.
      ResultCode getResultCode()
      Retrieves the result code for this LDAP exception.
      boolean hasResponseControl()
      Indicates whether this result contains at least one control.
      boolean hasResponseControl​(java.lang.String oid)
      Indicates whether this result contains at least one control with the specified OID.
      void throwLDAPException()
      Throws the wrapped LDAPException object.
      LDAPResult toLDAPResult()
      Creates a new LDAPResult object from this exception.
      void toString​(java.lang.StringBuilder buffer)
      Appends a string representation of this exception to the provided buffer.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LDAPRuntimeException

        public LDAPRuntimeException​(LDAPException ldapException)
        Creates a new instance of this LDAPRuntimeException using the provided LDAPException.
        Parameters:
        ldapException - The LDAPException object wrapped by this runtime exception.
    • Method Detail

      • getLDAPException

        public LDAPException getLDAPException()
        Retrieves the LDAPException object wrapped by this runtime exception.
        Returns:
        The LDAPException object wrapped by this runtime exception.
      • getResultCode

        public ResultCode getResultCode()
        Retrieves the result code for this LDAP exception.
        Returns:
        The result code for this LDAP exception.
      • getMatchedDN

        public java.lang.String getMatchedDN()
        Retrieves the matched DN for this LDAP exception.
        Returns:
        The matched DN for this LDAP exception, or null if there is none.
      • getDiagnosticMessage

        public java.lang.String getDiagnosticMessage()
        Retrieves the diagnostic message returned by the directory server.
        Returns:
        The diagnostic message returned by the directory server, or null if there is none.
      • getReferralURLs

        public java.lang.String[] getReferralURLs()
        Retrieves the set of referral URLs for this LDAP exception.
        Returns:
        The set of referral URLs for this LDAP exception, or an empty array if there are none.
      • hasResponseControl

        public boolean hasResponseControl()
        Indicates whether this result contains at least one control.
        Returns:
        true if this result contains at least one control, or false if not.
      • hasResponseControl

        public boolean hasResponseControl​(java.lang.String oid)
        Indicates whether this result contains at least one control with the specified OID.
        Parameters:
        oid - The object identifier for which to make the determination. It must not be null.
        Returns:
        true if this result contains at least one control with the specified OID, or false if not.
      • getResponseControls

        public Control[] getResponseControls()
        Retrieves the set of response controls for this LDAP exception.
        Returns:
        The set of response controls for this LDAP exception, or an empty array if there are none.
      • getResponseControl

        public Control getResponseControl​(java.lang.String oid)
        Retrieves the response control with the specified OID.
        Parameters:
        oid - The OID of the control to retrieve.
        Returns:
        The response control with the specified OID, or null if there is no such control.
      • toLDAPResult

        public LDAPResult toLDAPResult()
        Creates a new LDAPResult object from this exception.
        Returns:
        The LDAPResult object created from this exception.
      • toString

        public void toString​(java.lang.StringBuilder buffer)
        Appends a string representation of this exception to the provided buffer.
        Overrides:
        toString in class LDAPSDKRuntimeException
        Parameters:
        buffer - The buffer to which the string representation of this exception is to be appended.
      • getExceptionMessage

        public java.lang.String getExceptionMessage​(boolean includeStackTrace,
                                                    boolean includeCause)
        Retrieves a string representation of this exception suitable for use in messages.
        Overrides:
        getExceptionMessage in class LDAPSDKRuntimeException
        Parameters:
        includeStackTrace - Indicates whether to include information about the cause (if any) in the exception message.
        includeCause - Indicates whether to include a condensed representation of the stack trace in the exception message.
        Returns:
        A string representation of this exception suitable for use in messages.