Package com.unboundid.ldap.sdk
Class LDAPBindException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.unboundid.util.LDAPSDKException
-
- com.unboundid.ldap.sdk.LDAPException
-
- com.unboundid.ldap.sdk.LDAPBindException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
SASLBindInProgressException
@NotExtensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class LDAPBindException extends LDAPException
This class defines an exception that can be thrown if the server sends a bind response with a result code other thanResultCode.SUCCESS
, which indicates that the bind operation did not complete successfully. This may be used to obtain access to any server SASL credentials contained in the non-successful bind result.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.unboundid.ldap.sdk.LDAPException
NO_CONTROLS, NO_REFERRALS
-
-
Constructor Summary
Constructors Constructor Description LDAPBindException(BindResult bindResult)
Creates a new LDAP bind exception from the provided bind result.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BindResult
getBindResult()
Retrieves the bind result that was returned by the server.ASN1OctetString
getServerSASLCredentials()
Retrieves the server SASL credentials included in the bind result, if any.LDAPResult
toLDAPResult()
Creates a newLDAPResult
object from this exception.-
Methods inherited from class com.unboundid.ldap.sdk.LDAPException
getDiagnosticMessage, getExceptionMessage, getExceptionMessage, getMatchedDN, getReferralURLs, getResponseControl, getResponseControls, getResultCode, getResultString, hasResponseControl, hasResponseControl, toString, toString
-
Methods inherited from class com.unboundid.util.LDAPSDKException
toString
-
-
-
-
Constructor Detail
-
LDAPBindException
public LDAPBindException(@NotNull BindResult bindResult)
Creates a new LDAP bind exception from the provided bind result.- Parameters:
bindResult
- The bind result to use to create this exception.
-
-
Method Detail
-
toLDAPResult
@NotNull public LDAPResult toLDAPResult()
Creates a newLDAPResult
object from this exception.- Overrides:
toLDAPResult
in classLDAPException
- Returns:
- The
LDAPResult
object created from this exception.
-
getBindResult
@NotNull public BindResult getBindResult()
Retrieves the bind result that was returned by the server.- Returns:
- The bind result that was returned by the server.
-
getServerSASLCredentials
@Nullable public ASN1OctetString getServerSASLCredentials()
Retrieves the server SASL credentials included in the bind result, if any.- Returns:
- The server SASL credentials included in the bind result, or
null
if the bind result did not include any server SASL credentials.
-
-