Class LDAPResponse
- java.lang.Object
-
- com.unboundid.ldap.sdk.migrate.ldapjdk.LDAPResponse
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
LDAPExtendedResponse
@Extensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class LDAPResponse extends java.lang.Object implements java.io.Serializable
This class provides a data structure that represents a response that may be received from a directory server.
This class is primarily intended to be used in the process of updating applications which use the Netscape Directory SDK for Java to switch to or coexist with the UnboundID LDAP SDK for Java. For applications not written using the Netscape Directory SDK for Java, theLDAPResult
class should be used instead.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LDAPResponse(LDAPResult ldapResult)
Creates a new LDAP response from the providedLDAPResult
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LDAPControl[]
getControls()
Retrieves the list of controls for this LDAP response, if any.java.lang.String
getErrorMessage()
Retrieves the error message for this LDAP response, if available.java.lang.String
getMatchedDN()
Retrieves the matched DN for this LDAP response, if available.int
getMessageID()
Retrieves the LDAP message ID for this LDAP response.java.lang.String[]
getReferrals()
Retrieves the set of referrals for this LDAP response, if any.int
getResultCode()
Retrieves the result code for this LDAP response.LDAPResult
toLDAPResult()
Retrieves anLDAPResult
object that is the equivalent of this LDAP response.java.lang.String
toString()
Retrieves a string representation of this LDAP response.
-
-
-
Constructor Detail
-
LDAPResponse
public LDAPResponse(@NotNull LDAPResult ldapResult)
Creates a new LDAP response from the providedLDAPResult
.- Parameters:
ldapResult
- TheLDAPResult
object to use to create this LDAP response.
-
-
Method Detail
-
getMessageID
public int getMessageID()
Retrieves the LDAP message ID for this LDAP response.- Returns:
- The LDAP message ID for this LDAP response.
-
getResultCode
public int getResultCode()
Retrieves the result code for this LDAP response.- Returns:
- The result code for this LDAP response.
-
getErrorMessage
@Nullable public java.lang.String getErrorMessage()
Retrieves the error message for this LDAP response, if available.- Returns:
- The error message for this LDAP response, or
null
if there is none.
-
getMatchedDN
@Nullable public java.lang.String getMatchedDN()
Retrieves the matched DN for this LDAP response, if available.- Returns:
- The matched DN for this LDAP response, or
null
if there is none.
-
getReferrals
@Nullable public java.lang.String[] getReferrals()
Retrieves the set of referrals for this LDAP response, if any.- Returns:
- The set of referrals for this LDAP response, or
null
if there are none.
-
getControls
@Nullable public LDAPControl[] getControls()
Retrieves the list of controls for this LDAP response, if any.- Returns:
- The list of controls for this LDAP response, or
null
if there are none.
-
toLDAPResult
@NotNull public final LDAPResult toLDAPResult()
Retrieves anLDAPResult
object that is the equivalent of this LDAP response.- Returns:
- An
LDAPResult
object that is the equivalent of this LDAP response.
-
-