@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class LDAPSearchException extends LDAPException
SearchResult
object, potentially including entries and references
returned before the failure result.NO_CONTROLS, NO_REFERRALS
Constructor and Description |
---|
LDAPSearchException(LDAPException ldapException)
Creates a new LDAP search exception from the provided exception.
|
LDAPSearchException(ResultCode resultCode,
java.lang.String errorMessage)
Creates a new LDAP search exception with the provided information.
|
LDAPSearchException(ResultCode resultCode,
java.lang.String errorMessage,
java.lang.Throwable cause)
Creates a new LDAP search exception with the provided information.
|
LDAPSearchException(SearchResult searchResult)
Creates a new LDAP search exception with the provided result.
|
Modifier and Type | Method and Description |
---|---|
int |
getEntryCount()
Retrieves the number of matching entries returned for the search operation
before this exception was thrown.
|
int |
getReferenceCount()
Retrieves the number of search references returned for the search
operation before this exception was thrown.
|
java.util.List<SearchResultEntry> |
getSearchEntries()
Retrieves a list containing the matching entries returned from the search
operation before this exception was thrown.
|
java.util.List<SearchResultReference> |
getSearchReferences()
Retrieves a list containing the search references returned from the search
operation before this exception was thrown.
|
SearchResult |
getSearchResult()
Retrieves the search result object associated with this LDAP search
exception.
|
SearchResult |
toLDAPResult()
Creates a new
SearchResult object from this exception. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP exception to the provided
buffer.
|
void |
toString(java.lang.StringBuilder buffer,
boolean includeCause,
boolean includeStackTrace)
Appends a string representation of this
LDAPException to the
provided buffer. |
getDiagnosticMessage, getExceptionMessage, getExceptionMessage, getMatchedDN, getReferralURLs, getResponseControl, getResponseControls, getResultCode, getResultString, hasResponseControl, hasResponseControl
toString
public LDAPSearchException(@NotNull ResultCode resultCode, @NotNull java.lang.String errorMessage)
resultCode
- The result code for this LDAP search exception.errorMessage
- The error message for this LDAP search exception.public LDAPSearchException(@NotNull ResultCode resultCode, @NotNull java.lang.String errorMessage, @Nullable java.lang.Throwable cause)
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.public LDAPSearchException(@NotNull LDAPException ldapException)
ldapException
- The LDAP exception with the information to include
in this LDAP search exception.public LDAPSearchException(@NotNull SearchResult searchResult)
searchResult
- The search result to use to create this LDAP search
exception.@NotNull public SearchResult getSearchResult()
public int getEntryCount()
public int getReferenceCount()
@Nullable public java.util.List<SearchResultEntry> getSearchEntries()
SearchResultListener
was not used during the search.null
if a
SearchResultListener
was used during the search.@Nullable public java.util.List<SearchResultReference> getSearchReferences()
SearchResultListener
was not used during the search.null
if a
SearchResultListener
was used during the search.@NotNull public SearchResult toLDAPResult()
SearchResult
object from this exception.toLDAPResult
in class LDAPException
SearchResult
object created from this exception.public void toString(@NotNull java.lang.StringBuilder buffer)
toString
in class LDAPException
buffer
- The buffer to which to append a string representation of
this LDAP exception.public void toString(@NotNull java.lang.StringBuilder buffer, boolean includeCause, boolean includeStackTrace)
LDAPException
to the
provided buffer.toString
in class LDAPException
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.