Class ApiClient<T extends Transport,​Self extends ApiClient<T,​Self>>

java.lang.Object
co.elastic.clients.ApiClient<T,​Self>
Direct Known Subclasses:
ElasticsearchAsyncClient, ElasticsearchAsyncSearchAsyncClient, ElasticsearchAsyncSearchClient, ElasticsearchAutoscalingAsyncClient, ElasticsearchAutoscalingClient, ElasticsearchCatAsyncClient, ElasticsearchCatClient, ElasticsearchCcrAsyncClient, ElasticsearchCcrClient, ElasticsearchClient, ElasticsearchClusterAsyncClient, ElasticsearchClusterClient, ElasticsearchDanglingIndicesAsyncClient, ElasticsearchDanglingIndicesClient, ElasticsearchEnrichAsyncClient, ElasticsearchEnrichClient, ElasticsearchEqlAsyncClient, ElasticsearchEqlClient, ElasticsearchFeaturesAsyncClient, ElasticsearchFeaturesClient, ElasticsearchFleetAsyncClient, ElasticsearchFleetClient, ElasticsearchGraphAsyncClient, ElasticsearchGraphClient, ElasticsearchIlmAsyncClient, ElasticsearchIlmClient, ElasticsearchIndicesAsyncClient, ElasticsearchIndicesClient, ElasticsearchIngestAsyncClient, ElasticsearchIngestClient, ElasticsearchLicenseAsyncClient, ElasticsearchLicenseClient, ElasticsearchLogstashAsyncClient, ElasticsearchLogstashClient, ElasticsearchMigrationAsyncClient, ElasticsearchMigrationClient, ElasticsearchMlAsyncClient, ElasticsearchMlClient, ElasticsearchMonitoringAsyncClient, ElasticsearchMonitoringClient, ElasticsearchNodesAsyncClient, ElasticsearchNodesClient, ElasticsearchRollupAsyncClient, ElasticsearchRollupClient, ElasticsearchSearchableSnapshotsAsyncClient, ElasticsearchSearchableSnapshotsClient, ElasticsearchSecurityAsyncClient, ElasticsearchSecurityClient, ElasticsearchShutdownAsyncClient, ElasticsearchShutdownClient, ElasticsearchSlmAsyncClient, ElasticsearchSlmClient, ElasticsearchSnapshotAsyncClient, ElasticsearchSnapshotClient, ElasticsearchSqlAsyncClient, ElasticsearchSqlClient, ElasticsearchSslAsyncClient, ElasticsearchSslClient, ElasticsearchTasksAsyncClient, ElasticsearchTasksClient, ElasticsearchTransformAsyncClient, ElasticsearchTransformClient, ElasticsearchWatcherAsyncClient, ElasticsearchWatcherClient, ElasticsearchXpackAsyncClient, ElasticsearchXpackClient

public abstract class ApiClient<T extends Transport,​Self extends ApiClient<T,​Self>>
extends java.lang.Object
  • Field Details

  • Constructor Details

    • ApiClient

      protected ApiClient​(T transport, TransportOptions transportOptions)
  • Method Details

    • getDeserializer

      protected <V> JsonpDeserializer<V> getDeserializer​(java.lang.Class<V> clazz)
    • withTransportOptions

      public abstract Self withTransportOptions​(@Nullable TransportOptions transportOptions)
      Creates a new client with some request options
    • withTransportOptions

      public Self withTransportOptions​(java.util.function.Function<TransportOptions.Builder,​TransportOptions.Builder> fn)
      Creates a new client with additional request options
      Parameters:
      fn - a lambda expression that takes the current options as input
    • _transport

      public T _transport()
      Get the transport used by this client to handle communication with the server.
    • _transportOptions

      public TransportOptions _transportOptions()
      Get the transport options used for this client. If the client has no custom options, falls back to the transport's options.
    • _jsonpMapper

      public JsonpMapper _jsonpMapper()
      Get the JSON mapper used to map API objects to/from JSON.

      Shortcut for _transport().jsonpMapper()