Interface ActionPlugin


  • public interface ActionPlugin
    An additional extension point for Plugins that extends Elasticsearch's scripting functionality. Implement it like this:
    
       {@literal @}Override
       public List<ActionHandler<?, ?>> getActions() {
           return Arrays.asList(new ActionHandler<>(ReindexAction.INSTANCE, TransportReindexAction.class),
                   new ActionHandler<>(UpdateByQueryAction.INSTANCE, TransportUpdateByQueryAction.class),
                   new ActionHandler<>(DeleteByQueryAction.INSTANCE, TransportDeleteByQueryAction.class),
                   new ActionHandler<>(RethrottleAction.INSTANCE, TransportRethrottleAction.class));
       }
     
    • Method Detail

      • getActionFilters

        default java.util.List<ActionFilter> getActionFilters()
        Action filters added by this plugin.
      • getRestHeaders

        default java.util.Collection<java.lang.String> getRestHeaders()
        Returns headers which should be copied through rest requests on to internal requests.
      • getTaskHeaders

        default java.util.Collection<java.lang.String> getTaskHeaders()
        Returns headers which should be copied from internal requests into tasks.
      • getRestHandlerWrapper

        default java.util.function.UnaryOperator<RestHandler> getRestHandlerWrapper​(ThreadContext threadContext)
        Returns a function used to wrap each rest request before handling the request. Note: Only one installed plugin may implement a rest wrapper.