org.elasticsearch.action.support
Class BaseAction<Request extends ActionRequest,Response extends ActionResponse>

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.action.support.BaseAction<Request,Response>
All Implemented Interfaces:
Action<Request,Response>
Direct Known Subclasses:
TransportBroadcastOperationAction, TransportBulkAction, TransportIndexReplicationOperationAction, TransportIndicesReplicationOperationAction, TransportMasterNodeOperationAction, TransportMoreLikeThisAction, TransportMultiGetAction, TransportNodesOperationAction, TransportSearchAction, TransportSearchScrollAction, TransportSearchTypeAction, TransportShardReplicationOperationAction, TransportShardSingleOperationAction, TransportSingleCustomOperationAction

public abstract class BaseAction<Request extends ActionRequest,Response extends ActionResponse>
extends AbstractComponent
implements Action<Request,Response>


Field Summary
protected  ThreadPool threadPool
           
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
protected BaseAction(Settings settings, ThreadPool threadPool)
           
 
Method Summary
protected abstract  void doExecute(Request request, ActionListener<Response> listener)
           
 ActionFuture<Response> execute(Request request)
           
 void execute(Request request, ActionListener<Response> listener)
           
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threadPool

protected final ThreadPool threadPool
Constructor Detail

BaseAction

protected BaseAction(Settings settings,
                     ThreadPool threadPool)
Method Detail

execute

public ActionFuture<Response> execute(Request request)
                                                      throws ElasticSearchException
Specified by:
execute in interface Action<Request extends ActionRequest,Response extends ActionResponse>
Throws:
ElasticSearchException

execute

public void execute(Request request,
                    ActionListener<Response> listener)
Specified by:
execute in interface Action<Request extends ActionRequest,Response extends ActionResponse>

doExecute

protected abstract void doExecute(Request request,
                                  ActionListener<Response> listener)