public interface ActionPlugin
Plugin
s 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));
}
Modifier and Type | Interface and Description |
---|---|
static class |
ActionPlugin.ActionHandler<Request extends ActionRequest,Response extends ActionResponse> |
Modifier and Type | Method and Description |
---|---|
default java.util.List<java.lang.Class<? extends ActionFilter>> |
getActionFilters()
Action filters added by this plugin.
|
default java.util.List<ActionPlugin.ActionHandler<? extends ActionRequest,? extends ActionResponse>> |
getActions()
Actions added by this plugin.
|
default java.util.List<RestHandler> |
getRestHandlers(Settings settings,
RestController restController,
ClusterSettings clusterSettings,
IndexScopedSettings indexScopedSettings,
SettingsFilter settingsFilter,
IndexNameExpressionResolver indexNameExpressionResolver,
java.util.function.Supplier<DiscoveryNodes> nodesInCluster)
Rest handlers added by this plugin.
|
default java.util.function.UnaryOperator<RestHandler> |
getRestHandlerWrapper(ThreadContext threadContext)
Returns a function used to wrap each rest request before handling the request.
|
default java.util.Collection<java.lang.String> |
getRestHeaders()
Returns headers which should be copied through rest requests on to internal requests.
|
default java.util.List<ActionPlugin.ActionHandler<? extends ActionRequest,? extends ActionResponse>> getActions()
default java.util.List<java.lang.Class<? extends ActionFilter>> getActionFilters()
default java.util.List<RestHandler> getRestHandlers(Settings settings, RestController restController, ClusterSettings clusterSettings, IndexScopedSettings indexScopedSettings, SettingsFilter settingsFilter, IndexNameExpressionResolver indexNameExpressionResolver, java.util.function.Supplier<DiscoveryNodes> nodesInCluster)
default java.util.Collection<java.lang.String> getRestHeaders()
default java.util.function.UnaryOperator<RestHandler> getRestHandlerWrapper(ThreadContext threadContext)