@Extensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class LDAPResult extends java.lang.Object implements java.io.Serializable, LDAPResponse
ResultCode class for
information about a number of result codes defined in LDAP.BindResult and ExtendedResult subclasses are actually
intended to be extended by third-party code.NO_CONTROLS| Modifier | Constructor and Description |
|---|---|
|
LDAPResult(int messageID,
ResultCode resultCode)
Creates a new LDAP result object with the provided message ID and result
code, and no other information.
|
|
LDAPResult(int messageID,
ResultCode resultCode,
java.lang.String diagnosticMessage,
java.lang.String matchedDN,
java.util.List<java.lang.String> referralURLs,
java.util.List<Control> responseControls)
Creates a new LDAP result object with the provided information.
|
|
LDAPResult(int messageID,
ResultCode resultCode,
java.lang.String diagnosticMessage,
java.lang.String matchedDN,
java.lang.String[] referralURLs,
Control[] responseControls)
Creates a new LDAP result object with the provided information.
|
protected |
LDAPResult(LDAPResult result)
Creates a new LDAP result object based on the provided result.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDiagnosticMessage()
Retrieves the diagnostic message from the response, if available.
|
java.lang.String |
getMatchedDN()
Retrieves the matched DN from the response, if available.
|
int |
getMessageID()
Retrieves the message ID for the LDAP message with which this LDAP result
is associated.
|
java.lang.String[] |
getReferralURLs()
Retrieves the set of referral URLs from the response, if available.
|
Control |
getResponseControl(java.lang.String oid)
Retrieves the response control with the specified OID.
|
Control[] |
getResponseControls()
Retrieves the set of controls from the response, if available.
|
ResultCode |
getResultCode()
Retrieves the result code from the response.
|
java.lang.String |
getResultString()
Retrieves a string representation of this LDAP result, consisting of
the result code, diagnostic message (if present), matched DN (if present),
and referral URLs (if present).
|
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.
|
java.lang.String |
toString()
Retrieves a string representation of this LDAP result.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this LDAP result to the provided buffer.
|
protected LDAPResult(LDAPResult result)
result - The LDAP result object to use to initialize this result.public LDAPResult(int messageID, ResultCode resultCode)
messageID - The message ID for the LDAP message that is associated
with this LDAP result.resultCode - The result code from the response.public LDAPResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.lang.String[] referralURLs, Control[] responseControls)
messageID - The message ID for the LDAP message that is
associated with this LDAP 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.public LDAPResult(int messageID, ResultCode resultCode, java.lang.String diagnosticMessage, java.lang.String matchedDN, java.util.List<java.lang.String> referralURLs, java.util.List<Control> responseControls)
messageID - The message ID for the LDAP message that is
associated with this LDAP 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.public final int getMessageID()
getMessageID in interface LDAPResponsepublic final ResultCode getResultCode()
public final java.lang.String getDiagnosticMessage()
null if none
was provided.public final java.lang.String getMatchedDN()
null if none was
provided.public final java.lang.String[] getReferralURLs()
public final Control[] getResponseControls()
get method in the response control class.public final boolean hasResponseControl()
true if this result contains at least one control, or
false if not.public final boolean hasResponseControl(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.public final Control getResponseControl(java.lang.String oid)
oid - The OID for the response control to retrieve.null if there is no
such response control.public java.lang.String getResultString()
public java.lang.String toString()
toString in class java.lang.Objectpublic void toString(java.lang.StringBuilder buffer)
toString in interface LDAPResponsebuffer - The buffer to which to append a string representation of
this LDAP result.