public abstract class TransportAction<Request extends ActionRequest,Response extends ActionResponse> extends AbstractComponent
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
actionName |
protected IndexNameExpressionResolver |
indexNameExpressionResolver |
protected TaskManager |
taskManager |
protected ThreadPool |
threadPool |
deprecationLogger, logger, settings
Modifier | Constructor and Description |
---|---|
protected |
TransportAction(Settings settings,
java.lang.String actionName,
ThreadPool threadPool,
ActionFilters actionFilters,
IndexNameExpressionResolver indexNameExpressionResolver,
TaskManager taskManager) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doExecute(Request request,
ActionListener<Response> listener) |
protected void |
doExecute(Task task,
Request request,
ActionListener<Response> listener) |
ActionFuture<Response> |
execute(Request request) |
Task |
execute(Request request,
ActionListener<Response> listener)
Use this method when the transport action call should result in creation of a new task associated with the call.
|
Task |
execute(Request request,
TaskListener<Response> listener)
Execute the transport action on the local node, returning the
Task used to track its execution and accepting a
TaskListener which listens for the completion of the action. |
void |
execute(Task task,
Request request,
ActionListener<Response> listener)
Use this method when the transport action should continue to run in the context of the current task
|
logDeprecatedSetting, logRemovedSetting, nodeName
protected final ThreadPool threadPool
protected final java.lang.String actionName
protected final IndexNameExpressionResolver indexNameExpressionResolver
protected final TaskManager taskManager
protected TransportAction(Settings settings, java.lang.String actionName, ThreadPool threadPool, ActionFilters actionFilters, IndexNameExpressionResolver indexNameExpressionResolver, TaskManager taskManager)
public final ActionFuture<Response> execute(Request request)
public final Task execute(Request request, ActionListener<Response> listener)
public final Task execute(Request request, TaskListener<Response> listener)
Task
used to track its execution and accepting a
TaskListener
which listens for the completion of the action.public final void execute(Task task, Request request, ActionListener<Response> listener)
protected void doExecute(Task task, Request request, ActionListener<Response> listener)
protected abstract void doExecute(Request request, ActionListener<Response> listener)