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 BindResponse
await()
Waits for a result or reports a timeout exception.BindResponse
execute()
Convenience method that invokesOperationHandle.send()
followed byOperationHandle.await()
.protected BindResponse
processReferralResult(BindResponse done, ReferralResultHandler<BindResponse> handler)
Invokes the supplied referral result handler and returns the result of that handler.NettyConnection.BindOperationHandle
send()
Sends this request to the server.-
Methods inherited from class org.ldaptive.transport.DefaultOperationHandle
abandon, abandon, cancel, consumedMessage, consumedMessage, control, evaluateThrowCondition, exception, finalizeResult, getMessageID, getOnComplete, getOnControl, getOnException, getOnIntermediate, getOnReferral, getOnReferralResult, getOnResult, getOnUnsolicitedNotification, getReceivedTime, getRequest, getResponseTimeoutCondition, getSentTime, getThrowCondition, hasConsumedMessage, initializeMessageFunctional, initializeMessageFunctional, intermediate, messageID, onComplete, onControl, onException, onIntermediate, onReferral, onReferralResult, onResult, onUnsolicitedNotification, 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:OperationHandle
Sends this request to the server.- Specified by:
send
in interfaceOperationHandle<BindRequest,BindResponse>
- Overrides:
send
in classDefaultOperationHandle<BindRequest,BindResponse>
- Returns:
- this handle
-
await
public BindResponse await()
Description copied from interface:OperationHandle
Waits for a result or reports a timeout exception.- Specified by:
await
in interfaceOperationHandle<BindRequest,BindResponse>
- Overrides:
await
in 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:DefaultOperationHandle
Invokes the supplied referral result handler and returns the result of that handler.- Overrides:
processReferralResult
in 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:OperationHandle
Convenience 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
-
-