public final class RequestHandle extends Object
Modifier and Type | Method and Description |
---|---|
Completable |
abandon()
Returns a
Completable which, once subscribed, will attempt to abandon the operation. |
Single<Result> |
cancel()
Returns a
Single<Result> which, once subscribed, will attempt to cancel the operation. |
int |
getMessageId()
Returns the message ID used to send the request.
|
static RequestHandle |
newRequestHandle()
Creates a new
RequestHandle instance. |
public static RequestHandle newRequestHandle()
RequestHandle
instance.RequestHandle
instancepublic Single<Result> cancel()
Single<Result>
which, once subscribed, will attempt to cancel the operation.Single<Result>
which, once subscribed, will attempt to cancel the operation.public Completable abandon()
Completable
which, 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.
Completable
which, once subscribed, will attempt to abandon the operation.public int getMessageId()
Note that the message ID is only available once the request has been sent which happens once the response
Flowable
returned by
LdapClientSocket.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
.
-1
if the request has not been sent or if this
request handle is virtual.Copyright 2010-2022 ForgeRock AS.