Package org.elasticsearch.index.reindex
Interface RejectAwareActionListener<T>
- All Superinterfaces:
ActionListener<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.action.ActionListener
ActionListener.Delegating<Response,DelegateResponse>, ActionListener.DelegatingActionListener<T>, ActionListener.DelegatingFailureActionListener<T,R>, ActionListener.MappedActionListener<Response,MappedResponse>, ActionListener.RunAfterActionListener<T>, ActionListener.RunBeforeActionListener<T>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
static <X> RejectAwareActionListener<X>
withResponseHandler(RejectAwareActionListener<?> errorDelegate, Consumer<X> responseHandler)
Return a new listener that delegates failure/reject to errorDelegate but forwards response to responseHandlerstatic <Response> RejectAwareActionListener<Response>
wrap(org.elasticsearch.core.CheckedConsumer<Response,? extends Exception> onResponse, Consumer<Exception> onFailure, Consumer<Exception> onRejection)
Similar toActionListener.wrap(CheckedConsumer, Consumer)
, extended to have handler for onRejection.Methods inherited from interface org.elasticsearch.action.ActionListener
delegateFailure, delegateResponse, map, onFailure, onResponse
-
Method Details
-
onRejection
-
withResponseHandler
static <X> RejectAwareActionListener<X> withResponseHandler(RejectAwareActionListener<?> errorDelegate, Consumer<X> responseHandler)Return a new listener that delegates failure/reject to errorDelegate but forwards response to responseHandler -
wrap
static <Response> RejectAwareActionListener<Response> wrap(org.elasticsearch.core.CheckedConsumer<Response,? extends Exception> onResponse, Consumer<Exception> onFailure, Consumer<Exception> onRejection)Similar toActionListener.wrap(CheckedConsumer, Consumer)
, extended to have handler for onRejection.
-