Package org.elasticsearch.action.support
Class TransportAction<Request extends ActionRequest,Response extends ActionResponse>
java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
- Direct Known Subclasses:
HandledTransportAction
,TransportReplicationAction
,TransportSingleShardAction
public abstract class TransportAction<Request extends ActionRequest,Response extends ActionResponse>
extends Object
-
Field Summary
Modifier and TypeFieldDescriptionfinal String
protected final Transport.Connection
protected org.apache.logging.log4j.Logger
Deprecated.declare your own logger.protected final TaskManager
-
Constructor Summary
ModifierConstructorDescriptionprotected
TransportAction
(String actionName, ActionFilters actionFilters, Transport.Connection localConnection, TaskManager taskManager) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
doExecute
(Task task, Request request, ActionListener<Response> listener) final 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 taskfinal 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.final Task
execute
(Request request, TaskListener<Response> listener) Execute the transport action on the local node, returning theTask
used to track its execution and accepting aTaskListener
which listens for the completion of the action.
-
Field Details
-
actionName
-
taskManager
-
localConnection
-
logger
Deprecated.declare your own logger.
-
-
Constructor Details
-
TransportAction
protected TransportAction(String actionName, ActionFilters actionFilters, Transport.Connection localConnection, TaskManager taskManager)
-
-
Method Details
-
execute
Use this method when the transport action call should result in creation of a new task associated with the call. This is a typical behavior. -
execute
Execute the transport action on the local node, returning theTask
used to track its execution and accepting aTaskListener
which listens for the completion of the action. -
execute
Use this method when the transport action should continue to run in the context of the current task -
doExecute
-