Class TransportAction<Request extends ActionRequest,Response extends ActionResponse>

java.lang.Object
org.elasticsearch.action.support.TransportAction<Request,Response>
Direct Known Subclasses:
GetHealthAction.LocalAction, HandledTransportAction, TransportNodesAction, TransportReplicationAction, TransportSingleShardAction

public abstract class TransportAction<Request extends ActionRequest,Response extends ActionResponse> extends Object
  • Field Details

    • actionName

      public final String actionName
    • taskManager

      protected final TaskManager taskManager
    • logger

      @Deprecated protected org.apache.logging.log4j.Logger logger
      Deprecated.
      declare your own logger.
  • Constructor Details

  • Method Details

    • execute

      public 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 task
    • doExecute

      protected abstract void doExecute(Task task, Request request, ActionListener<Response> listener)
    • localOnly

      public static <T> T localOnly()
      A method to use as a placeholder in implementations of TransportAction which only ever run on the local node, and therefore do not need to serialize or deserialize any messages.