Package org.elasticsearch.action.support
Class ActionFilter.Simple
- java.lang.Object
-
- org.elasticsearch.action.support.ActionFilter.Simple
-
- All Implemented Interfaces:
ActionFilter
- Enclosing interface:
- ActionFilter
public abstract static class ActionFilter.Simple extends java.lang.Object implements ActionFilter
A simple base class for injectable action filters that spares the implementation from handling the filter chain. This base class should serve any action filter implementations that doesn't require to apply async filtering logic.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.action.support.ActionFilter
ActionFilter.Simple
-
-
Constructor Summary
Constructors Constructor Description Simple()
-
Method Summary
Modifier and Type Method Description protected abstract boolean
apply(java.lang.String action, ActionRequest request, ActionListener<?> listener)
Applies this filter and returnstrue
if the execution chain should proceed, orfalse
if it should be aborted since the filter already handled the request and called the given listener.<Request extends ActionRequest,Response extends ActionResponse>
voidapply(Task task, java.lang.String action, Request request, ActionListener<Response> listener, ActionFilterChain<Request,Response> chain)
Enables filtering the execution of an action on the request side, either by sending a response through theActionListener
or by continuing the execution through the givenchain
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.action.support.ActionFilter
order
-
-
-
-
Method Detail
-
apply
public final <Request extends ActionRequest,Response extends ActionResponse> void apply(Task task, java.lang.String action, Request request, ActionListener<Response> listener, ActionFilterChain<Request,Response> chain)
Description copied from interface:ActionFilter
Enables filtering the execution of an action on the request side, either by sending a response through theActionListener
or by continuing the execution through the givenchain
- Specified by:
apply
in interfaceActionFilter
-
apply
protected abstract boolean apply(java.lang.String action, ActionRequest request, ActionListener<?> listener)
Applies this filter and returnstrue
if the execution chain should proceed, orfalse
if it should be aborted since the filter already handled the request and called the given listener.
-
-