Package com.unboundid.ldap.sdk
Class SearchResultReference
- java.lang.Object
-
- com.unboundid.ldap.sdk.SearchResultReference
-
- All Implemented Interfaces:
LDAPResponse
,java.io.Serializable
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class SearchResultReference extends java.lang.Object implements java.io.Serializable, LDAPResponse
This class provides a data structure for representing an LDAP search result reference. A search result reference consists of a set of referral URLs and may also include zero or more controls. It describes an alternate location in which additional results for the search may be found. If there are multiple referral URLs, then they should all be considered equivalent ways to access the information (e.g., referrals referencing different servers that may be contacted).- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface com.unboundid.ldap.protocol.LDAPResponse
NO_CONTROLS
-
-
Constructor Summary
Constructors Constructor Description SearchResultReference(int messageID, java.lang.String[] referralURLs, Control[] controls)
Creates a new search result reference with the provided information.SearchResultReference(java.lang.String[] referralURLs, Control[] controls)
Creates a new search result reference with the provided information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Control
getControl(java.lang.String oid)
Retrieves the control with the specified OID.Control[]
getControls()
Retrieves the set of controls returned with this search result reference.int
getMessageID()
Retrieves the message ID for the LDAP message containing this response.java.lang.String[]
getReferralURLs()
Retrieves the set of referral URLs for this search result reference.java.lang.String
toString()
Retrieves a string representation of this search result reference.void
toString(java.lang.StringBuilder buffer)
Appends a string representation of this search result reference to the provided buffer.
-
-
-
Constructor Detail
-
SearchResultReference
public SearchResultReference(@NotNull java.lang.String[] referralURLs, @NotNull Control[] controls)
Creates a new search result reference with the provided information.- Parameters:
referralURLs
- The set of referral URLs for this search result reference. It must not benull
.controls
- The set of controls returned with this search result reference. It must not benull
.
-
SearchResultReference
public SearchResultReference(int messageID, @NotNull java.lang.String[] referralURLs, @NotNull Control[] controls)
Creates a new search result reference with the provided information.- Parameters:
messageID
- The message ID for the LDAP message containing this response.referralURLs
- The set of referral URLs for this search result reference. It must not benull
.controls
- The set of controls returned with this search result reference. It must not benull
.
-
-
Method Detail
-
getMessageID
public int getMessageID()
Retrieves the message ID for the LDAP message containing this response.- Specified by:
getMessageID
in interfaceLDAPResponse
- Returns:
- The message ID for the LDAP message containing this response.
-
getReferralURLs
@NotNull public java.lang.String[] getReferralURLs()
Retrieves the set of referral URLs for this search result reference.- Returns:
- The set of referral URLs for this search result reference.
-
getControls
@NotNull public Control[] getControls()
Retrieves the set of controls returned with this search result reference. Individual response controls of a specific type may be retrieved and decoded using theget
method in the response control class.- Returns:
- The set of controls returned with this search result reference.
-
getControl
@Nullable public Control getControl(@NotNull java.lang.String oid)
Retrieves the control with the specified OID. If there is more than one control with the given OID, then the first will be returned.- Parameters:
oid
- The OID of the control to retrieve.- Returns:
- The control with the requested OID, or
null
if there is no such control for this search result reference.
-
toString
@NotNull public java.lang.String toString()
Retrieves a string representation of this search result reference.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of this search result reference.
-
toString
public void toString(@NotNull java.lang.StringBuilder buffer)
Appends a string representation of this search result reference to the provided buffer.- Specified by:
toString
in interfaceLDAPResponse
- Parameters:
buffer
- The buffer to which to append the string representation of this search result reference.
-
-