public final class SearchResultLdapPromiseImpl extends ResultLdapPromiseImpl<SearchRequest,Result> implements SearchResultHandler
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
boolean |
checkForTimeout()
Returns
true if this request should be canceled once the timeout
period expires. |
R |
get() |
R |
get(long timeout,
TimeUnit unit) |
R |
getOrThrow() |
R |
getOrThrow(long timeout,
TimeUnit unit) |
R |
getOrThrowUninterruptibly() |
R |
getOrThrowUninterruptibly(long timeout,
TimeUnit unit) |
int |
getRequestID()
Returns the request ID of the request if appropriate.
|
P |
getWrappedPromise() |
boolean |
handleEntry(SearchResultEntry entry)
Invoked each time a search result entry is returned from an asynchronous
search operation.
|
boolean |
handleReference(SearchResultReference reference)
Invoked each time a search result reference is returned from an
asynchronous search operation.
|
boolean |
isCancelled() |
boolean |
isDone() |
<VOUT,EOUT extends Exception> |
then(org.forgerock.util.Function<? super R,VOUT,EOUT> onResult,
org.forgerock.util.Function<? super LdapException,VOUT,EOUT> onException) |
<VOUT,EOUT extends Exception> |
then(org.forgerock.util.Function<? super R,VOUT,EOUT> onResult,
org.forgerock.util.Function<? super LdapException,VOUT,EOUT> onException,
org.forgerock.util.Function<? super RuntimeException,VOUT,EOUT> onRuntimeException) |
<VOUT> LdapPromise<VOUT> |
then(org.forgerock.util.Function<? super R,VOUT,LdapException> onResult) |
LdapPromise<R> |
thenAlways(Runnable onResultOrException) |
<VOUT,EOUT extends Exception> |
thenAsync(org.forgerock.util.AsyncFunction<? super R,VOUT,EOUT> onResult,
org.forgerock.util.AsyncFunction<? super LdapException,VOUT,EOUT> onException) |
<VOUT,EOUT extends Exception> |
thenAsync(org.forgerock.util.AsyncFunction<? super R,VOUT,EOUT> onResult,
org.forgerock.util.AsyncFunction<? super LdapException,VOUT,EOUT> onException,
org.forgerock.util.AsyncFunction<? super RuntimeException,VOUT,EOUT> onRuntimeException) |
<VOUT> LdapPromise<VOUT> |
thenAsync(org.forgerock.util.AsyncFunction<? super R,VOUT,LdapException> onResult) |
<EOUT extends Exception> |
thenCatch(org.forgerock.util.Function<? super LdapException,R,EOUT> onException) |
<EOUT extends Exception> |
thenCatchAsync(org.forgerock.util.AsyncFunction<? super LdapException,R,EOUT> onException) |
org.forgerock.util.promise.Promise<R,LdapException> |
thenCatchRuntimeException(org.forgerock.util.Function<? super RuntimeException,R,LdapException> onRuntimeException) |
org.forgerock.util.promise.Promise<R,LdapException> |
thenCatchRuntimeExceptionAsync(org.forgerock.util.AsyncFunction<? super RuntimeException,R,LdapException> onRuntimeException) |
LdapPromise<R> |
thenFinally(Runnable onResultOrException) |
LdapPromise<R> |
thenOnException(org.forgerock.util.promise.ExceptionHandler<? super LdapException> onException) |
LdapPromise<R> |
thenOnResult(org.forgerock.util.promise.ResultHandler<? super R> onResult) |
LdapPromise<R> |
thenOnResultOrException(org.forgerock.util.promise.ResultHandler<? super R> onResult,
org.forgerock.util.promise.ExceptionHandler<? super LdapException> onException) |
LdapPromise<R> |
thenOnResultOrException(Runnable onResultOrException) |
LdapPromise<R> |
thenOnRuntimeException(org.forgerock.util.promise.RuntimeExceptionHandler onRuntimeException) |
adaptErrorResult, getRequest, getTimestamp, handleIntermediateResponse, isBindOrStartTLS, setResultOrError, toStringhandleException, handleResult, newLdapPromiseImpl, newLdapPromiseImplclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRequestID, then, thenAlways, thenAsync, thenFinally, thenOnException, thenOnResult, thenOnResultOrException, thenOnResultOrExceptioncancel, get, get, getOrThrow, getOrThrow, getOrThrowUninterruptibly, getOrThrowUninterruptibly, isCancelled, isDone, then, then, thenAsync, thenAsync, thenCatch, thenCatchAsync, thenCatchRuntimeException, thenCatchRuntimeExceptionAsync, thenOnRuntimeExceptionpublic boolean handleEntry(SearchResultEntry entry)
SearchResultHandlerhandleEntry in interface SearchResultHandlerentry - The search result entry.true if this handler should continue to be notified of
any remaining entries and references, or false if the
remaining entries and references should be skipped for some
reason (e.g. a client side size limit has been reached).public boolean handleReference(SearchResultReference reference)
SearchResultHandlerhandleReference in interface SearchResultHandlerreference - The search result reference.true if this handler should continue to be notified of
any remaining entries and references, or false if the
remaining entries and references should be skipped for some
reason (e.g. a client side size limit has been reached).public boolean checkForTimeout()
ResultLdapPromiseImpltrue if this request should be canceled once the timeout
period expires. The default implementation is to return true
which will be appropriate for nearly all requests, the one obvious
exception being persistent searches.checkForTimeout in class ResultLdapPromiseImpl<SearchRequest,Result>true if this request should be canceled once the timeout
period expires.public int getRequestID()
LdapPromisegetRequestID in interface LdapPromise<R>-1 if there is no request ID.public boolean cancel(boolean mayInterruptIfRunning)
cancel in interface Future<R>cancel in interface org.forgerock.util.promise.Promise<R,LdapException>public R get()
throws ExecutionException,
InterruptedException
get in interface Future<R>get in interface org.forgerock.util.promise.Promise<R,LdapException>ExecutionExceptionInterruptedExceptionpublic R get(long timeout,
TimeUnit unit)
throws ExecutionException,
TimeoutException,
InterruptedException
get in interface Future<R>get in interface org.forgerock.util.promise.Promise<R,LdapException>ExecutionExceptionTimeoutExceptionInterruptedExceptionpublic R getOrThrow()
throws InterruptedException,
LdapException
getOrThrow in interface org.forgerock.util.promise.Promise<R,LdapException>InterruptedExceptionLdapExceptionpublic R getOrThrow(long timeout,
TimeUnit unit)
throws InterruptedException,
LdapException,
TimeoutException
getOrThrow in interface org.forgerock.util.promise.Promise<R,LdapException>InterruptedExceptionLdapExceptionTimeoutExceptionpublic R getOrThrowUninterruptibly()
throws LdapException
getOrThrowUninterruptibly in interface org.forgerock.util.promise.Promise<R,LdapException>LdapExceptionpublic R getOrThrowUninterruptibly(long timeout,
TimeUnit unit)
throws LdapException,
TimeoutException
getOrThrowUninterruptibly in interface org.forgerock.util.promise.Promise<R,LdapException>LdapExceptionTimeoutExceptionpublic boolean isCancelled()
isCancelled in interface Future<R>isCancelled in interface org.forgerock.util.promise.Promise<R,LdapException>public boolean isDone()
isDone in interface Future<R>isDone in interface org.forgerock.util.promise.Promise<R,LdapException>public LdapPromise<R> thenOnException(org.forgerock.util.promise.ExceptionHandler<? super LdapException> onException)
thenOnException in interface LdapPromise<R>thenOnException in interface org.forgerock.util.promise.Promise<R,LdapException>public LdapPromise<R> thenOnRuntimeException(org.forgerock.util.promise.RuntimeExceptionHandler onRuntimeException)
thenOnRuntimeException in interface org.forgerock.util.promise.Promise<R,LdapException>public LdapPromise<R> thenOnResult(org.forgerock.util.promise.ResultHandler<? super R> onResult)
thenOnResult in interface LdapPromise<R>thenOnResult in interface org.forgerock.util.promise.Promise<R,LdapException>public LdapPromise<R> thenOnResultOrException(Runnable onResultOrException)
thenOnResultOrException in interface LdapPromise<R>thenOnResultOrException in interface org.forgerock.util.promise.Promise<R,LdapException>public <VOUT> LdapPromise<VOUT> then(org.forgerock.util.Function<? super R,VOUT,LdapException> onResult)
then in interface LdapPromise<R>then in interface org.forgerock.util.promise.Promise<R,LdapException>public <VOUT,EOUT extends Exception> org.forgerock.util.promise.Promise<VOUT,EOUT> then(org.forgerock.util.Function<? super R,VOUT,EOUT> onResult, org.forgerock.util.Function<? super LdapException,VOUT,EOUT> onException)
then in interface org.forgerock.util.promise.Promise<R,LdapException>public <VOUT,EOUT extends Exception> org.forgerock.util.promise.Promise<VOUT,EOUT> then(org.forgerock.util.Function<? super R,VOUT,EOUT> onResult, org.forgerock.util.Function<? super LdapException,VOUT,EOUT> onException, org.forgerock.util.Function<? super RuntimeException,VOUT,EOUT> onRuntimeException)
then in interface org.forgerock.util.promise.Promise<R,LdapException>public LdapPromise<R> thenOnResultOrException(org.forgerock.util.promise.ResultHandler<? super R> onResult, org.forgerock.util.promise.ExceptionHandler<? super LdapException> onException)
thenOnResultOrException in interface LdapPromise<R>thenOnResultOrException in interface org.forgerock.util.promise.Promise<R,LdapException>public LdapPromise<R> thenAlways(Runnable onResultOrException)
thenAlways in interface LdapPromise<R>thenAlways in interface org.forgerock.util.promise.Promise<R,LdapException>public <VOUT> LdapPromise<VOUT> thenAsync(org.forgerock.util.AsyncFunction<? super R,VOUT,LdapException> onResult)
thenAsync in interface LdapPromise<R>thenAsync in interface org.forgerock.util.promise.Promise<R,LdapException>public <VOUT,EOUT extends Exception> org.forgerock.util.promise.Promise<VOUT,EOUT> thenAsync(org.forgerock.util.AsyncFunction<? super R,VOUT,EOUT> onResult, org.forgerock.util.AsyncFunction<? super LdapException,VOUT,EOUT> onException)
thenAsync in interface org.forgerock.util.promise.Promise<R,LdapException>public <VOUT,EOUT extends Exception> org.forgerock.util.promise.Promise<VOUT,EOUT> thenAsync(org.forgerock.util.AsyncFunction<? super R,VOUT,EOUT> onResult, org.forgerock.util.AsyncFunction<? super LdapException,VOUT,EOUT> onException, org.forgerock.util.AsyncFunction<? super RuntimeException,VOUT,EOUT> onRuntimeException)
thenAsync in interface org.forgerock.util.promise.Promise<R,LdapException>public <EOUT extends Exception> org.forgerock.util.promise.Promise<R,EOUT> thenCatch(org.forgerock.util.Function<? super LdapException,R,EOUT> onException)
thenCatch in interface org.forgerock.util.promise.Promise<R,LdapException>public org.forgerock.util.promise.Promise<R,LdapException> thenCatchRuntimeException(org.forgerock.util.Function<? super RuntimeException,R,LdapException> onRuntimeException)
thenCatchRuntimeException in interface org.forgerock.util.promise.Promise<R,LdapException>public org.forgerock.util.promise.Promise<R,LdapException> thenCatchRuntimeExceptionAsync(org.forgerock.util.AsyncFunction<? super RuntimeException,R,LdapException> onRuntimeException)
thenCatchRuntimeExceptionAsync in interface org.forgerock.util.promise.Promise<R,LdapException>public LdapPromise<R> thenFinally(Runnable onResultOrException)
thenFinally in interface LdapPromise<R>thenFinally in interface org.forgerock.util.promise.Promise<R,LdapException>public <EOUT extends Exception> org.forgerock.util.promise.Promise<R,EOUT> thenCatchAsync(org.forgerock.util.AsyncFunction<? super LdapException,R,EOUT> onException)
thenCatchAsync in interface org.forgerock.util.promise.Promise<R,LdapException>public P getWrappedPromise()
Copyright © 2017-2020 Wren Security. All Rights Reserved.