Package org.ldaptive
Class SearchReference
- java.lang.Object
-
- org.ldaptive.SearchReference
-
- All Implemented Interfaces:
Message<ResponseControl>
,ResponseMessage
public class SearchReference extends Object implements ResponseMessage
Simple bean representing a search reference.
-
-
Field Summary
Fields Modifier and Type Field Description private static int
HASH_CODE_SEED
hash code seed.private int
messageId
message ID.private Response<SearchResult>
referenceResponse
response from following the reference.private String[]
referralUrls
referral urls.private ResponseControl[]
responseControls
response controls.
-
Constructor Summary
Constructors Constructor Description SearchReference(int id, ResponseControl[] c, String... url)
Creates a search reference.SearchReference(int id, ResponseControl[] c, Collection<String> urls)
Creates a search reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
ResponseControl
getControl(String oid)
Returns the first response control with the supplied OID for this response message.ResponseControl[]
getControls()
Returns the controls for this message.int
getMessageId()
Returns the message ID for this response message.Response<SearchResult>
getReferenceResponse()
Returns the response from following the reference.String[]
getReferralUrls()
Returns the referral urls for this search reference.int
hashCode()
void
setReferenceResponse(Response<SearchResult> response)
Sets the response from following the reference.String
toString()
-
-
-
Field Detail
-
HASH_CODE_SEED
private static final int HASH_CODE_SEED
hash code seed.- See Also:
- Constant Field Values
-
referralUrls
private final String[] referralUrls
referral urls.
-
responseControls
private final ResponseControl[] responseControls
response controls.
-
messageId
private final int messageId
message ID.
-
referenceResponse
private Response<SearchResult> referenceResponse
response from following the reference.
-
-
Constructor Detail
-
SearchReference
public SearchReference(int id, ResponseControl[] c, String... url)
Creates a search reference.- Parameters:
id
- message idc
- response controlsurl
- referral urls
-
SearchReference
public SearchReference(int id, ResponseControl[] c, Collection<String> urls)
Creates a search reference.- Parameters:
id
- message idc
- response controlsurls
- referral urls
-
-
Method Detail
-
getReferralUrls
public String[] getReferralUrls()
Returns the referral urls for this search reference.- Returns:
- referral urls
-
getControls
public ResponseControl[] getControls()
Description copied from interface:Message
Returns the controls for this message.- Specified by:
getControls
in interfaceMessage<ResponseControl>
- Returns:
- controls
-
getControl
public ResponseControl getControl(String oid)
Description copied from interface:ResponseMessage
Returns the first response control with the supplied OID for this response message.- Specified by:
getControl
in interfaceResponseMessage
- Parameters:
oid
- of the response control to return- Returns:
- response control or null if control could not be found
-
getMessageId
public int getMessageId()
Description copied from interface:ResponseMessage
Returns the message ID for this response message.- Specified by:
getMessageId
in interfaceResponseMessage
- Returns:
- message id
-
getReferenceResponse
public Response<SearchResult> getReferenceResponse()
Returns the response from following the reference.- Returns:
- reference response or null.
-
setReferenceResponse
public void setReferenceResponse(Response<SearchResult> response)
Sets the response from following the reference.- Parameters:
response
- from following the reference
-
-