Class LDAPSearchException

    • Constructor Detail

      • LDAPSearchException

        public LDAPSearchException​(@NotNull
                                   ResultCode resultCode,
                                   @NotNull
                                   java.lang.String errorMessage)
        Creates a new LDAP search exception with the provided information.
        Parameters:
        resultCode - The result code for this LDAP search exception.
        errorMessage - The error message for this LDAP search exception.
      • LDAPSearchException

        public LDAPSearchException​(@NotNull
                                   ResultCode resultCode,
                                   @NotNull
                                   java.lang.String errorMessage,
                                   @Nullable
                                   java.lang.Throwable cause)
        Creates a new LDAP search exception with the provided information.
        Parameters:
        resultCode - The result code for this LDAP search exception.
        errorMessage - The error message for this LDAP search exception.
        cause - The underlying exception that triggered this LDAP search exception.
      • LDAPSearchException

        public LDAPSearchException​(@NotNull
                                   LDAPException ldapException)
        Creates a new LDAP search exception from the provided exception.
        Parameters:
        ldapException - The LDAP exception with the information to include in this LDAP search exception.
      • LDAPSearchException

        public LDAPSearchException​(@NotNull
                                   SearchResult searchResult)
        Creates a new LDAP search exception with the provided result.
        Parameters:
        searchResult - The search result to use to create this LDAP search exception.
    • Method Detail

      • getSearchResult

        @NotNull
        public SearchResult getSearchResult()
        Retrieves the search result object associated with this LDAP search exception.
        Returns:
        The search result object associated with this LDAP search exception.
      • getEntryCount

        public int getEntryCount()
        Retrieves the number of matching entries returned for the search operation before this exception was thrown.
        Returns:
        The number of matching entries returned for the search operation before this exception was thrown.
      • getReferenceCount

        public int getReferenceCount()
        Retrieves the number of search references returned for the search operation before this exception was thrown.
        Returns:
        The number of search references returned for the search operation before this exception was thrown.
      • getSearchEntries

        @Nullable
        public java.util.List<SearchResultEntrygetSearchEntries()
        Retrieves a list containing the matching entries returned from the search operation before this exception was thrown. This will only be available if a SearchResultListener was not used during the search.
        Returns:
        A list containing the matching entries returned from the search operation before this exception was thrown, or null if a SearchResultListener was used during the search.
      • getSearchReferences

        @Nullable
        public java.util.List<SearchResultReferencegetSearchReferences()
        Retrieves a list containing the search references returned from the search operation before this exception was thrown. This will only be available if a SearchResultListener was not used during the search.
        Returns:
        A list containing the search references returned from the search operation before this exception was thrown, or null if a SearchResultListener was used during the search.
      • toString

        public void toString​(@NotNull
                             java.lang.StringBuilder buffer)
        Appends a string representation of this LDAP exception to the provided buffer.
        Overrides:
        toString in class LDAPException
        Parameters:
        buffer - The buffer to which to append a string representation of this LDAP exception.
      • toString

        public void toString​(@NotNull
                             java.lang.StringBuilder buffer,
                             boolean includeCause,
                             boolean includeStackTrace)
        Appends a string representation of this LDAPException to the provided buffer.
        Overrides:
        toString in class LDAPException
        Parameters:
        buffer - The buffer to which the information should be appended. This must not be null.
        includeCause - Indicates whether to include information about the cause (if any) in the exception message.
        includeStackTrace - Indicates whether to include a condensed representation of the stack trace in the exception message. If a stack trace is included, then the cause (if any) will automatically be included, regardless of the value of the includeCause argument.