Class RequestHandle
-
Method Summary
Modifier and TypeMethodDescriptionabandon()Returns aCompletablewhich, once subscribed, will attempt to abandon the operation.cancel()Returns aSingle<Result>which, once subscribed, will attempt to cancel the operation.intReturns the message ID used to send the request.static RequestHandleCreates a newRequestHandleinstance.
-
Method Details
-
newRequestHandle
Creates a newRequestHandleinstance.- Returns:
- A new
RequestHandleinstance
-
abandon
Returns aCompletablewhich, once subscribed, will attempt to abandon the operation.Abandon requests do not have a response.
Note: a more convenient approach for abandoning unfinished operations is provided via the
cancel()method.- Returns:
- A
Completablewhich, once subscribed, will attempt to abandon the operation.
-
cancel
Returns aSingle<Result>which, once subscribed, will attempt to cancel the operation.- Returns:
- a
Single<Result>which, once subscribed, will attempt to cancel the operation.
-
getMessageId
public int getMessageId()Returns the message ID used to send the request.Note that the message ID is only available once the request has been sent which happens once the response
Flowablereturned byLdapClientSocket.send()has been subscribed to. Trying to get the message ID of a request which has not been sent will returns-1.Because a ldap client socket can be virtual (e.g: load balancers), a message ID is not always available. Indeed in some situation a single request handle could actually represent different requests sent to potentially different server. This is refered as a virtual request handle. In this case, the returned message ID will always be
-1.- Returns:
- The message ID used to send the request, or
-1if the request has not been sent or if this request handle is virtual.
-