@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class LDAPRuntimeException extends LDAPSDKRuntimeException
LDAPException class that may be
thrown as a RuntimeException without the need for it to have been
explicitly declared in the method's throws list.| Constructor and Description |
|---|
LDAPRuntimeException(LDAPException ldapException)
Creates a new instance of this
LDAPRuntimeException using the
provided LDAPException. |
| Modifier and Type | Method and 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.
|
toStringpublic LDAPRuntimeException(@NotNull LDAPException ldapException)
LDAPRuntimeException using the
provided LDAPException.ldapException - The LDAPException object wrapped by this
runtime exception.@NotNull public LDAPException getLDAPException()
LDAPException object wrapped by this runtime
exception.LDAPException object wrapped by this runtime
exception.public void throwLDAPException() throws LDAPException
LDAPException object.LDAPException - The wrapped LDAPException object.@NotNull public ResultCode getResultCode()
@Nullable public java.lang.String getMatchedDN()
null if there
is none.@Nullable public java.lang.String getDiagnosticMessage()
null if there is none.@NotNull public java.lang.String[] getReferralURLs()
public boolean hasResponseControl()
true if this result contains at least one control, or
false if not.public boolean hasResponseControl(@NotNull java.lang.String oid)
oid - The object identifier for which to make the determination. It
must not be null.true if this result contains at least one control with
the specified OID, or false if not.@NotNull public Control[] getResponseControls()
@Nullable public Control getResponseControl(@NotNull java.lang.String oid)
oid - The OID of the control to retrieve.null if
there is no such control.@NotNull public LDAPResult toLDAPResult()
LDAPResult object from this exception.LDAPResult object created from this exception.public void toString(@NotNull java.lang.StringBuilder buffer)
toString in class LDAPSDKRuntimeExceptionbuffer - The buffer to which the string representation of this
exception is to be appended.@NotNull public java.lang.String getExceptionMessage()
getExceptionMessage in class LDAPSDKRuntimeException@NotNull public java.lang.String getExceptionMessage(boolean includeStackTrace, boolean includeCause)
getExceptionMessage in class LDAPSDKRuntimeExceptionincludeStackTrace - 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.