Package org.ldaptive
Interface CompareOperationHandle
-
- All Superinterfaces:
OperationHandle<CompareRequest,CompareResponse>
- All Known Implementing Classes:
DefaultCompareOperationHandle
public interface CompareOperationHandle extends OperationHandle<CompareRequest,CompareResponse>
Handle that notifies on the components of a compare request.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CompareResponse
await()
Waits for a result or reports a timeout exception.default CompareResponse
execute()
Convenience method that invokesOperationHandle.send()
followed byOperationHandle.await()
.CompareOperationHandle
onCompare(CompareValueHandler... function)
Sets the function to execute when a compare result is received.CompareOperationHandle
onComplete(CompleteHandler function)
Sets the function to execute when the operation completes.CompareOperationHandle
onControl(ResponseControlHandler... function)
Sets the functions to execute when a control is received.CompareOperationHandle
onException(ExceptionHandler function)
Sets the function to execute when an exception occurs.CompareOperationHandle
onIntermediate(IntermediateResponseHandler... function)
Sets the functions to execute when an intermediate response is received.CompareOperationHandle
onReferral(ReferralHandler... function)
Sets the functions to execute when a referral is received.CompareOperationHandle
onReferralResult(ReferralResultHandler<CompareResponse> function)
Sets the functions to execute when a response is complete and contains a referral result code.CompareOperationHandle
onResult(ResultHandler... function)
Sets the functions to execute when a result is received.CompareOperationHandle
onUnsolicitedNotification(UnsolicitedNotificationHandler... function)
Sets the functions to execute when an unsolicited notification is received.CompareOperationHandle
send()
Sends this request to the server.CompareOperationHandle
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 Detail
-
send
CompareOperationHandle send()
Description copied from interface:OperationHandle
Sends this request to the server.- Specified by:
send
in interfaceOperationHandle<CompareRequest,CompareResponse>
- Returns:
- this handle
-
await
CompareResponse await() throws LdapException
Description copied from interface:OperationHandle
Waits for a result or reports a timeout exception.- Specified by:
await
in interfaceOperationHandle<CompareRequest,CompareResponse>
- Returns:
- result of the operation or empty if the operation is abandoned
- Throws:
LdapException
- if an error occurs executing the request
-
execute
default CompareResponse execute() throws LdapException
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<CompareRequest,CompareResponse>
- Returns:
- result of the operation or empty if the operation is abandoned
- Throws:
LdapException
- if an error occurs executing the request
-
onResult
CompareOperationHandle onResult(ResultHandler... function)
Description copied from interface:OperationHandle
Sets the functions to execute when a result is received.- Specified by:
onResult
in interfaceOperationHandle<CompareRequest,CompareResponse>
- Parameters:
function
- to execute on a result- Returns:
- this handle
-
onControl
CompareOperationHandle onControl(ResponseControlHandler... function)
Description copied from interface:OperationHandle
Sets the functions to execute when a control is received.- Specified by:
onControl
in interfaceOperationHandle<CompareRequest,CompareResponse>
- Parameters:
function
- to execute on a control- Returns:
- this handle
-
onReferral
CompareOperationHandle onReferral(ReferralHandler... function)
Description copied from interface:OperationHandle
Sets the functions to execute when a referral is received.- Specified by:
onReferral
in interfaceOperationHandle<CompareRequest,CompareResponse>
- Parameters:
function
- to execute on a referral- Returns:
- this handle
-
onIntermediate
CompareOperationHandle onIntermediate(IntermediateResponseHandler... function)
Description copied from interface:OperationHandle
Sets the functions to execute when an intermediate response is received.- Specified by:
onIntermediate
in interfaceOperationHandle<CompareRequest,CompareResponse>
- Parameters:
function
- to execute on an intermediate response- Returns:
- this handle
-
onUnsolicitedNotification
CompareOperationHandle onUnsolicitedNotification(UnsolicitedNotificationHandler... function)
Description copied from interface:OperationHandle
Sets the functions to execute when an unsolicited notification is received.- Specified by:
onUnsolicitedNotification
in interfaceOperationHandle<CompareRequest,CompareResponse>
- Parameters:
function
- to execute on an unsolicited notification- Returns:
- this handle
-
onReferralResult
CompareOperationHandle onReferralResult(ReferralResultHandler<CompareResponse> function)
Description copied from interface:OperationHandle
Sets the functions to execute when a response is complete and contains a referral result code.- Specified by:
onReferralResult
in interfaceOperationHandle<CompareRequest,CompareResponse>
- Parameters:
function
- to execute on a referral response- Returns:
- this handle
-
onException
CompareOperationHandle onException(ExceptionHandler function)
Description copied from interface:OperationHandle
Sets the function to execute when an exception occurs.- Specified by:
onException
in interfaceOperationHandle<CompareRequest,CompareResponse>
- Parameters:
function
- to execute when an exception occurs- Returns:
- this handle
-
throwIf
CompareOperationHandle throwIf(ResultPredicate function)
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<CompareRequest,CompareResponse>
- Parameters:
function
- to determine whether to throw an exception- Returns:
- this handle
-
onComplete
CompareOperationHandle onComplete(CompleteHandler function)
Description copied from interface:OperationHandle
Sets the function to execute when the operation completes.- Specified by:
onComplete
in interfaceOperationHandle<CompareRequest,CompareResponse>
- Parameters:
function
- to execute on completion- Returns:
- this handle
-
onCompare
CompareOperationHandle onCompare(CompareValueHandler... function)
Sets the function to execute when a compare result is received.- Parameters:
function
- to execute on a compare result- Returns:
- this handle
-
-