Package org.ldaptive.transport
Class DefaultExtendedOperationHandle
java.lang.Object
org.ldaptive.transport.DefaultOperationHandle<ExtendedRequest,ExtendedResponse>
org.ldaptive.transport.DefaultExtendedOperationHandle
- All Implemented Interfaces:
ExtendedOperationHandle,OperationHandle<ExtendedRequest,ExtendedResponse>
public final class DefaultExtendedOperationHandle
extends DefaultOperationHandle<ExtendedRequest,ExtendedResponse>
implements ExtendedOperationHandle
Handle that notifies on the components of an extended request.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ExtendedValueHandler[]Functions to handle extended response name and value.Fields inherited from class org.ldaptive.transport.DefaultOperationHandle
logger -
Constructor Summary
ConstructorsConstructorDescriptionDefaultExtendedOperationHandle(ExtendedRequest req, TransportConnection conn, Duration timeout) Creates a new extended operation handle. -
Method Summary
Modifier and TypeMethodDescriptionvoidextended(ExtendedResponse response) InvokesonExtended.Return the extended value handler.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.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.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.toString()Methods inherited from class org.ldaptive.transport.DefaultOperationHandle
abandon, abandon, await, cancel, consumedMessage, consumedMessage, control, evaluateThrowCondition, exception, finalizeResult, getAbandonedTime, getMessageID, getOnComplete, getOnControl, getOnException, getOnIntermediate, getOnReferral, getOnReferralResult, getOnResult, getOnUnsolicitedNotification, getReceivedTime, getRequest, getResponseTimeoutCondition, getSentTime, getThrowCondition, hasConsumedMessage, initializeMessageFunctional, initializeMessageFunctional, intermediate, messageID, notifyExceptionHandlers, processHandlerException, processReferralResult, processResult, referral, result, sent, unsolicitedNotificationMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ldaptive.extended.ExtendedOperationHandle
await, executeMethods inherited from interface org.ldaptive.OperationHandle
abandon, cancel, getAbandonedTime, getReceivedTime, getSentTime
-
Field Details
-
onExtended
Functions to handle extended response name and value.
-
-
Constructor Details
-
DefaultExtendedOperationHandle
public DefaultExtendedOperationHandle(ExtendedRequest req, TransportConnection conn, Duration timeout) Creates a new extended operation handle.- Parameters:
req- search request to expect a response forconn- the request will be executed ontimeout- duration to wait for a response
-
-
Method Details
-
send
Description copied from interface:OperationHandleSends this request to the server.- Specified by:
sendin interfaceExtendedOperationHandle- Specified by:
sendin interfaceOperationHandle<ExtendedRequest,ExtendedResponse> - Overrides:
sendin classDefaultOperationHandle<ExtendedRequest,ExtendedResponse> - Returns:
- this handle
-
onResult
Description copied from interface:OperationHandleSets the functions to execute when a result is received.- Specified by:
onResultin interfaceExtendedOperationHandle- Specified by:
onResultin interfaceOperationHandle<ExtendedRequest,ExtendedResponse> - Overrides:
onResultin classDefaultOperationHandle<ExtendedRequest,ExtendedResponse> - 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 interfaceExtendedOperationHandle- Specified by:
onControlin interfaceOperationHandle<ExtendedRequest,ExtendedResponse> - Overrides:
onControlin classDefaultOperationHandle<ExtendedRequest,ExtendedResponse> - 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 interfaceExtendedOperationHandle- Specified by:
onReferralin interfaceOperationHandle<ExtendedRequest,ExtendedResponse> - Overrides:
onReferralin classDefaultOperationHandle<ExtendedRequest,ExtendedResponse> - 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 interfaceExtendedOperationHandle- Specified by:
onIntermediatein interfaceOperationHandle<ExtendedRequest,ExtendedResponse> - Overrides:
onIntermediatein classDefaultOperationHandle<ExtendedRequest,ExtendedResponse> - Parameters:
function- to execute on an intermediate response- Returns:
- this handle
-
onUnsolicitedNotification
public DefaultExtendedOperationHandle onUnsolicitedNotification(UnsolicitedNotificationHandler... function) Description copied from interface:OperationHandleSets the functions to execute when an unsolicited notification is received.- Specified by:
onUnsolicitedNotificationin interfaceExtendedOperationHandle- Specified by:
onUnsolicitedNotificationin interfaceOperationHandle<ExtendedRequest,ExtendedResponse> - Overrides:
onUnsolicitedNotificationin classDefaultOperationHandle<ExtendedRequest,ExtendedResponse> - Parameters:
function- to execute on an unsolicited notification- Returns:
- this handle
-
onReferralResult
public DefaultExtendedOperationHandle onReferralResult(ReferralResultHandler<ExtendedResponse> function) Description copied from interface:OperationHandleSets the functions to execute when a response is complete and contains a referral result code.- Specified by:
onReferralResultin interfaceExtendedOperationHandle- Specified by:
onReferralResultin interfaceOperationHandle<ExtendedRequest,ExtendedResponse> - Overrides:
onReferralResultin classDefaultOperationHandle<ExtendedRequest,ExtendedResponse> - 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 interfaceExtendedOperationHandle- Specified by:
onExceptionin interfaceOperationHandle<ExtendedRequest,ExtendedResponse> - Overrides:
onExceptionin classDefaultOperationHandle<ExtendedRequest,ExtendedResponse> - Parameters:
function- to execute when an exception occurs- 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 interfaceExtendedOperationHandle- Specified by:
throwIfin interfaceOperationHandle<ExtendedRequest,ExtendedResponse> - Overrides:
throwIfin classDefaultOperationHandle<ExtendedRequest,ExtendedResponse> - Parameters:
function- to determine whether to throw an exception- Returns:
- this handle
-
onComplete
Description copied from interface:OperationHandleSets the function to execute when the operation completes.- Specified by:
onCompletein interfaceExtendedOperationHandle- Specified by:
onCompletein interfaceOperationHandle<ExtendedRequest,ExtendedResponse> - Overrides:
onCompletein classDefaultOperationHandle<ExtendedRequest,ExtendedResponse> - Parameters:
function- to execute on completion- Returns:
- this handle
-
onExtended
Description copied from interface:ExtendedOperationHandleSets the function to execute when an extended result is received.- Specified by:
onExtendedin interfaceExtendedOperationHandle- Parameters:
function- to execute on an extended result- Returns:
- this handle
-
getOnExtended
Return the extended value handler.- Returns:
- extended value handler
-
extended
InvokesonExtended.- Parameters:
response- extended response
-
toString
- Overrides:
toStringin classDefaultOperationHandle<ExtendedRequest,ExtendedResponse>
-