Class FilterClient

java.lang.Object
org.elasticsearch.client.support.AbstractClient
org.elasticsearch.client.FilterClient
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable, Client, ElasticsearchClient, 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
      Parameters:
      in - the client to delegate to
      See Also:
      in()
    • 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​(java.lang.String clusterAlias)
      Description copied from interface: Client
      Returns a client to a remote cluster with the given cluster alias.