Package com.unboundid.ldap.sdk
Class BindResult
- java.lang.Object
-
- com.unboundid.ldap.sdk.LDAPResult
-
- com.unboundid.ldap.sdk.BindResult
-
- All Implemented Interfaces:
LDAPResponse
,java.io.Serializable
@Extensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class BindResult extends LDAPResult
This class provides a data structure for holding information about the result of processing a bind operation. It provides generic bind response elements as described in theLDAPResult
class, but may be overridden to provide more detailed information for specific types of bind requests.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.unboundid.ldap.protocol.LDAPResponse
NO_CONTROLS
-
-
Constructor Summary
Constructors Modifier Constructor Description BindResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.lang.String[] referralURLs, Control[] responseControls)
Creates a new bind result with the provided information.BindResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.lang.String[] referralURLs, Control[] responseControls, ASN1OctetString serverSASLCredentials)
Creates a new bind result with the provided information.protected
BindResult(BindResult bindResult)
Creates a new bind result from the provided bind result.BindResult(LDAPException exception)
Creates a new bind result from the providedLDAPException
.BindResult(LDAPResult ldapResult)
Creates a new bind result from the provided generic LDAP result.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ASN1OctetString
getServerSASLCredentials()
Retrieves the server SASL credentials from the bind result, if available.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP result to the provided buffer.-
Methods inherited from class com.unboundid.ldap.sdk.LDAPResult
getDiagnosticMessage, getMatchedDN, getMessageID, getReferralURLs, getResponseControl, getResponseControls, getResultCode, getResultString, hasResponseControl, hasResponseControl, toString
-
-
-
-
Constructor Detail
-
BindResult
public BindResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.lang.String[] referralURLs, Control[] responseControls)
Creates a new bind result with the provided information.- Parameters:
messageID
- The message ID for the LDAP message that is associated with this bind result.resultCode
- The result code from the response.diagnosticMessage
- The diagnostic message from the response, if available.matchedDN
- The matched DN from the response, if available.referralURLs
- The set of referral URLs from the response, if available.responseControls
- The set of controls from the response, if available.
-
BindResult
public BindResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.lang.String[] referralURLs, Control[] responseControls, ASN1OctetString serverSASLCredentials)
Creates a new bind result with the provided information.- Parameters:
messageID
- The message ID for the LDAP message that is associated with this bind result.resultCode
- The result code from the response.diagnosticMessage
- The diagnostic message from the response, if available.matchedDN
- The matched DN from the response, if available.referralURLs
- The set of referral URLs from the response, if available.responseControls
- The set of controls from the response, if available.serverSASLCredentials
- The server SASL credentials from the response, if available.
-
BindResult
public BindResult(LDAPResult ldapResult)
Creates a new bind result from the provided generic LDAP result.- Parameters:
ldapResult
- The LDAP result to use to create this bind result.
-
BindResult
public BindResult(LDAPException exception)
Creates a new bind result from the providedLDAPException
.- Parameters:
exception
- TheLDAPException
to use to create this bind result.
-
BindResult
protected BindResult(BindResult bindResult)
Creates a new bind result from the provided bind result. This constructor may be used in creating custom subclasses.- Parameters:
bindResult
- The bind result to use to create this bind result.
-
-
Method Detail
-
getServerSASLCredentials
public ASN1OctetString getServerSASLCredentials()
Retrieves the server SASL credentials from the bind result, if available.- Returns:
- The server SASL credentials from the bind response, or
null
if none were provided.
-
toString
public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP result to the provided buffer.- Specified by:
toString
in interfaceLDAPResponse
- Overrides:
toString
in classLDAPResult
- Parameters:
buffer
- The buffer to which to append a string representation of this LDAP result.
-
-