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
Constructors Constructor Description BindOperationHandle(BindRequest req, TransportConnection conn, Duration timeout)Creates a new bind operation handle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BindResponseawait()Waits for a result or reports a timeout exception.BindResponseexecute()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.NettyConnection.BindOperationHandlesend()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 Detail
-
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 Detail
-
send
public NettyConnection.BindOperationHandle 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
public BindResponse 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
public BindResponse execute() throws LdapException
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
-
-