Package org.ldaptive
Interface SearchOperationHandle
- All Superinterfaces:
OperationHandle<SearchRequest,SearchResponse>
- All Known Implementing Classes:
DefaultSearchOperationHandle
Handle that notifies on the components of a search request.
-
Method Summary
Modifier and TypeMethodDescriptionawait()Waits for a result or reports a timeout exception.default SearchResponseexecute()Convenience method that invokesOperationHandle.send()followed byOperationHandle.await().onComplete(CompleteHandler function) Sets the function to execute when the operation completes.onControl(ResponseControlHandler... function) Sets the functions to execute when a control is received.onEntry(LdapEntryHandler... function) Sets the functions to execute when a search result entry is received.onException(ExceptionHandler function) Sets the function to execute when an exception occurs.onIntermediate(IntermediateResponseHandler... function) Sets the functions to execute when an intermediate response is received.onReference(SearchReferenceHandler... function) Sets the functions to execute when a search result reference is received.onReferral(ReferralHandler... function) Sets the functions to execute when a referral is received.onReferralResult(ReferralResultHandler<SearchResponse> function) Sets the functions to execute when a response is complete and contains a referral result code.onResult(ResultHandler... function) Sets the functions to execute when a result is received.onSearchResult(SearchResultHandler... function) Sets the functions to execute when a search result is complete.onUnsolicitedNotification(UnsolicitedNotificationHandler... function) Sets the functions to execute when an unsolicited notification is received.send()Sends this request to the server.throwIf(ResultPredicate function) Sets the function to determine whether an exception should be raised by a particular result.Methods inherited from interface org.ldaptive.OperationHandle
abandon, cancel, getAbandonedTime, getReceivedTime, getSentTime
-
Method Details
-
send
SearchOperationHandle send()Description copied from interface:OperationHandleSends this request to the server.- Specified by:
sendin interfaceOperationHandle<SearchRequest,SearchResponse> - Returns:
- this handle
-
await
Description copied from interface:OperationHandleWaits for a result or reports a timeout exception.- Specified by:
awaitin interfaceOperationHandle<SearchRequest,SearchResponse> - Returns:
- result of the operation or empty if the operation is abandoned
- Throws:
LdapException- if an error occurs executing the request
-
execute
Description copied from interface:OperationHandleConvenience method that invokesOperationHandle.send()followed byOperationHandle.await(). Provides a single method to make a synchronous request.- Specified by:
executein interfaceOperationHandle<SearchRequest,SearchResponse> - Returns:
- result of the operation or empty if the operation is abandoned
- Throws:
LdapException- if an error occurs executing the request
-
onResult
Description copied from interface:OperationHandleSets the functions to execute when a result is received.- Specified by:
onResultin interfaceOperationHandle<SearchRequest,SearchResponse> - Parameters:
function- to execute on a result- Returns:
- this handle
-
onControl
Description copied from interface:OperationHandleSets the functions to execute when a control is received.- Specified by:
onControlin interfaceOperationHandle<SearchRequest,SearchResponse> - Parameters:
function- to execute on a control- Returns:
- this handle
-
onReferral
Description copied from interface:OperationHandleSets the functions to execute when a referral is received.- Specified by:
onReferralin interfaceOperationHandle<SearchRequest,SearchResponse> - Parameters:
function- to execute on a referral- Returns:
- this handle
-
onIntermediate
Description copied from interface:OperationHandleSets the functions to execute when an intermediate response is received.- Specified by:
onIntermediatein interfaceOperationHandle<SearchRequest,SearchResponse> - Parameters:
function- to execute on an intermediate response- Returns:
- this handle
-
onUnsolicitedNotification
Description copied from interface:OperationHandleSets the functions to execute when an unsolicited notification is received.- Specified by:
onUnsolicitedNotificationin interfaceOperationHandle<SearchRequest,SearchResponse> - Parameters:
function- to execute on an unsolicited notification- Returns:
- this handle
-
onReferralResult
Description copied from interface:OperationHandleSets the functions to execute when a response is complete and contains a referral result code.- Specified by:
onReferralResultin interfaceOperationHandle<SearchRequest,SearchResponse> - Parameters:
function- to execute on a referral response- Returns:
- this handle
-
onException
Description copied from interface:OperationHandleSets the function to execute when an exception occurs.- Specified by:
onExceptionin interfaceOperationHandle<SearchRequest,SearchResponse> - Parameters:
function- to execute when an exception occurs- Returns:
- this handle
-
onComplete
Description copied from interface:OperationHandleSets the function to execute when the operation completes.- Specified by:
onCompletein interfaceOperationHandle<SearchRequest,SearchResponse> - Parameters:
function- to execute on completion- Returns:
- this handle
-
throwIf
Description copied from interface:OperationHandleSets the function to determine whether an exception should be raised by a particular result.- Specified by:
throwIfin interfaceOperationHandle<SearchRequest,SearchResponse> - Parameters:
function- to determine whether to throw an exception- Returns:
- this handle
-
onEntry
Sets the functions to execute when a search result entry is received.- Parameters:
function- to execute on a search result entry- Returns:
- this handle
-
onReference
Sets the functions to execute when a search result reference is received.- Parameters:
function- to execute on a search result reference- Returns:
- this handle
-
onSearchResult
Sets the functions to execute when a search result is complete.- Parameters:
function- to execute on a search result- Returns:
- this handle
-