Class DefaultOperationHandle<Q extends Request,​S extends Result>

    • Field Detail

      • DEFAULT_RESPONSE_TIMEOUT_CONDITION

        private static final Predicate<Message> DEFAULT_RESPONSE_TIMEOUT_CONDITION
        Predicate that requires any result message except unsolicited.
      • logger

        protected final Logger logger
        Logger for this class.
      • request

        private Request request
        Protocol request to send.
      • responseTimeout

        private Duration responseTimeout
        Time to wait for a response.
      • messageID

        private Integer messageID
        Protocol message ID.
      • onResult

        private ResultHandler[] onResult
        Functions to handle response results.
      • onReferral

        private ReferralHandler[] onReferral
        Functions to handle referral URLs.
      • onException

        private ExceptionHandler onException
        Function to handle exceptions.
      • onComplete

        private CompleteHandler onComplete
        Function to run when the operation completes.
      • throwCondition

        private ResultPredicate throwCondition
        Function to run when a result is received to determine whether an exception should be raised.
      • responseSemaphore

        private final Semaphore responseSemaphore
        Semaphore to determine when a response has been received.
      • creationTime

        private final Instant creationTime
        Timestamp when the handle was created.
      • receivedTime

        private Instant receivedTime
        Timestamp when the result was received or an exception occurred.
      • consumedMessage

        private boolean consumedMessage
        Whether this handle has consumed any messages.
      • result

        private S extends Result result
        Protocol response result.
      • exception

        private LdapException exception
        Exception encountered attempting to process the request.
    • Constructor Detail

      • DefaultOperationHandle

        public DefaultOperationHandle​(Q req,
                                      TransportConnection conn,
                                      Duration timeout)
        Creates a new operation handle.
        Parameters:
        req - request to expect a response for
        conn - the request will be executed on
        timeout - duration to wait for a response