Class FilterClient

All Implemented Interfaces:
Closeable, AutoCloseable, Client, ElasticsearchClient, org.elasticsearch.core.Releasable
Direct Known Subclasses:
OriginSettingClient, ParentTaskAssigningClient, RestCancellableNodeClient

public abstract class FilterClient extends AbstractClient
A Client that contains another Client which it uses as its basic source, possibly transforming the requests / responses along the way or providing additional functionality.
  • Field Details

    • in

      protected final Client in
  • Constructor Details

    • FilterClient

      public FilterClient(Client in)
      Creates a new FilterClient
      in - the client to delegate to
      See Also:
    • FilterClient

      protected FilterClient(Settings settings, ThreadPool threadPool, Client in)
      A Constructor that allows to pass settings and threadpool separately. This is useful if the client is a proxy and not yet fully constructed ie. both dependencies are not available yet.
  • Method Details

    • close

      public void close()
    • doExecute

      protected <Request extends ActionRequest,​ Response extends ActionResponse> void doExecute(ActionType<Response> action, Request request, ActionListener<Response> listener)
      Specified by:
      doExecute in class AbstractClient
    • in

      protected Client in()
      Returns the delegate Client
    • getRemoteClusterClient

      public Client getRemoteClusterClient(String clusterAlias)
      Description copied from interface: Client
      Returns a client to a remote cluster with the given cluster alias.