Package org.ldaptive.transport.netty
Class NettyConnection.BindOperationHandle
java.lang.Object
org.ldaptive.transport.DefaultOperationHandle<BindRequest,BindResponse>
org.ldaptive.transport.netty.NettyConnection.BindOperationHandle
- All Implemented Interfaces:
OperationHandle<BindRequest,BindResponse>
- Enclosing class:
- NettyConnection
public final class NettyConnection.BindOperationHandle
extends DefaultOperationHandle<BindRequest,BindResponse>
Bind specific operation handle that locks other operations until the bind completes.
-
Field Summary
Fields inherited from class org.ldaptive.transport.DefaultOperationHandle
logger -
Constructor Summary
ConstructorsConstructorDescriptionBindOperationHandle(BindRequest req, TransportConnection conn, Duration timeout) Creates a new bind operation handle. -
Method Summary
Modifier and TypeMethodDescriptionawait()Waits for a result or reports a timeout exception.execute()Convenience method that invokesOperationHandle.send()followed byOperationHandle.await().protected BindResponseprocessReferralResult(BindResponse done, ReferralResultHandler<BindResponse> handler) Invokes the supplied referral result handler and returns the result of that handler.send()Sends this request to the server.Methods inherited from class org.ldaptive.transport.DefaultOperationHandle
abandon, abandon, 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, onComplete, onControl, onException, onIntermediate, onReferral, onReferralResult, onResult, onUnsolicitedNotification, processHandlerException, processResult, referral, result, sent, throwIf, toString, unsolicitedNotification
-
Constructor Details
-
BindOperationHandle
BindOperationHandle(BindRequest req, TransportConnection conn, Duration timeout) Creates a new bind operation handle.- Parameters:
req- bind 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 interfaceOperationHandle<BindRequest,BindResponse> - Overrides:
sendin classDefaultOperationHandle<BindRequest,BindResponse> - Returns:
- this handle
-
await
Description copied from interface:OperationHandleWaits for a result or reports a timeout exception.- Specified by:
awaitin interfaceOperationHandle<BindRequest,BindResponse> - Overrides:
awaitin classDefaultOperationHandle<BindRequest,BindResponse> - Returns:
- result of the operation or empty if the operation is abandoned
-
processReferralResult
protected BindResponse processReferralResult(BindResponse done, ReferralResultHandler<BindResponse> handler) throws LdapException Description copied from class:DefaultOperationHandleInvokes the supplied referral result handler and returns the result of that handler.- Overrides:
processReferralResultin classDefaultOperationHandle<BindRequest,BindResponse> - Parameters:
done- operation resulthandler- to invoke- Returns:
- result returned by the handler
- Throws:
LdapException- if the handler throws an LdapException
-
execute
Description copied from interface:OperationHandleConvenience method that invokesOperationHandle.send()followed byOperationHandle.await(). Provides a single method to make a synchronous request.- Returns:
- result of the operation or empty if the operation is abandoned
- Throws:
LdapException- if an error occurs executing the request
-