Package org.ldaptive.extended
Interface ExtendedOperationHandle
- All Superinterfaces:
OperationHandle<ExtendedRequest,
ExtendedResponse>
- All Known Implementing Classes:
DefaultExtendedOperationHandle
Handle that notifies on the components of an extended request.
-
Method Summary
Modifier and TypeMethodDescriptionawait()
Waits for a result or reports a timeout exception.default ExtendedResponse
execute()
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.onException
(ExceptionHandler function) Sets the function to execute when an exception occurs.onExtended
(ExtendedValueHandler... function) Sets the function to execute when an extended result is received.onIntermediate
(IntermediateResponseHandler... function) Sets the functions to execute when an intermediate response is received.onReferral
(ReferralHandler... function) Sets the functions to execute when a referral is received.onResult
(ResultHandler... function) Sets the functions to execute when a result is received.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, getReceivedTime, getSentTime
-
Method Details
-
send
ExtendedOperationHandle send()Description copied from interface:OperationHandle
Sends this request to the server.- Specified by:
send
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - Returns:
- this handle
-
await
Description copied from interface:OperationHandle
Waits for a result or reports a timeout exception.- Specified by:
await
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - 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:OperationHandle
Convenience method that invokesOperationHandle.send()
followed byOperationHandle.await()
. Provides a single method to make a synchronous request.- Specified by:
execute
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - 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:OperationHandle
Sets the functions to execute when a result is received.- Specified by:
onResult
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - Parameters:
function
- to execute on a result- Returns:
- this handle
-
onControl
Description copied from interface:OperationHandle
Sets the functions to execute when a control is received.- Specified by:
onControl
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - Parameters:
function
- to execute on a control- Returns:
- this handle
-
onReferral
Description copied from interface:OperationHandle
Sets the functions to execute when a referral is received.- Specified by:
onReferral
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - Parameters:
function
- to execute on a referral- Returns:
- this handle
-
onIntermediate
Description copied from interface:OperationHandle
Sets the functions to execute when an intermediate response is received.- Specified by:
onIntermediate
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - Parameters:
function
- to execute on an intermediate response- Returns:
- this handle
-
onUnsolicitedNotification
Description copied from interface:OperationHandle
Sets the functions to execute when an unsolicited notification is received.- Specified by:
onUnsolicitedNotification
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - Parameters:
function
- to execute on an unsolicited notification- Returns:
- this handle
-
onException
Description copied from interface:OperationHandle
Sets the function to execute when an exception occurs.- Specified by:
onException
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - Parameters:
function
- to execute when an exception occurs- Returns:
- this handle
-
throwIf
Description copied from interface:OperationHandle
Sets the function to determine whether an exception should be raised by a particular result.- Specified by:
throwIf
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - Parameters:
function
- to determine whether to throw an exception- Returns:
- this handle
-
onComplete
Description copied from interface:OperationHandle
Sets the function to execute when the operation completes.- Specified by:
onComplete
in interfaceOperationHandle<ExtendedRequest,
ExtendedResponse> - Parameters:
function
- to execute on completion- Returns:
- this handle
-
onExtended
Sets the function to execute when an extended result is received.- Parameters:
function
- to execute on an extended result- Returns:
- this handle
-