Class PreBuiltTransportClient

java.lang.Object
All Implemented Interfaces:
java.io.Closeable, java.lang.AutoCloseable, Client, ElasticsearchClient, Releasable

@Deprecated
public class PreBuiltTransportClient
extends TransportClient
Deprecated.
TransportClient is deprecated in favour of the High Level REST client and will be removed in Elasticsearch 8.0.
A builder to create an instance of TransportClient. This class pre-installs the Netty4Plugin, ReindexPlugin, PercolatorPlugin, MustachePlugin, ParentJoinPlugin plugins for the client. These plugins are all the required modules for Elasticsearch.
  • Constructor Details

    • PreBuiltTransportClient

      @SafeVarargs public PreBuiltTransportClient​(Settings settings, java.lang.Class<? extends Plugin>... plugins)
      Deprecated.
      Creates a new transport client with pre-installed plugins.
      Parameters:
      settings - the settings passed to this transport client
      plugins - an optional array of additional plugins to run with this client
    • PreBuiltTransportClient

      public PreBuiltTransportClient​(Settings settings, java.util.Collection<java.lang.Class<? extends Plugin>> plugins)
      Deprecated.
      Creates a new transport client with pre-installed plugins.
      Parameters:
      settings - the settings passed to this transport client
      plugins - a collection of additional plugins to run with this client
    • PreBuiltTransportClient

      public PreBuiltTransportClient​(Settings settings, java.util.Collection<java.lang.Class<? extends Plugin>> plugins, TransportClient.HostFailureListener hostFailureListener)
      Deprecated.
      Creates a new transport client with pre-installed plugins.
      Parameters:
      settings - the settings passed to this transport client
      plugins - a collection of additional plugins to run with this client
      hostFailureListener - a failure listener that is invoked if a node is disconnected; this can be null
  • Method Details

    • close

      public void close()
      Deprecated.
      Specified by:
      close in interface java.lang.AutoCloseable
      Specified by:
      close in interface java.io.Closeable
      Specified by:
      close in interface Releasable
      Overrides:
      close in class TransportClient