Class XPackClient

java.lang.Object
org.elasticsearch.client.XPackClient

public final class XPackClient
extends java.lang.Object
A wrapper for the RestHighLevelClient that provides methods for accessing the Elastic Licensed X-Pack APIs that are shipped with the default distribution of Elasticsearch. All of these APIs will 404 if run against the OSS distribution of Elasticsearch.

See the REST APIs on elastic.co for more information.

  • Method Summary

    Modifier and Type Method Description
    XPackInfoResponse info​(XPackInfoRequest request, org.elasticsearch.client.RequestOptions options)
    Fetch information about X-Pack from the cluster.
    org.elasticsearch.client.Cancellable infoAsync​(XPackInfoRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<XPackInfoResponse> listener)
    Asynchronously fetch information about X-Pack from the cluster.
    XPackUsageResponse usage​(XPackUsageRequest request, org.elasticsearch.client.RequestOptions options)
    Fetch usage information about X-Pack features from the cluster.
    org.elasticsearch.client.Cancellable usageAsync​(XPackUsageRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<XPackUsageResponse> listener)
    Asynchronously fetch usage information about X-Pack features from the cluster.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • info

      public XPackInfoResponse info​(XPackInfoRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Fetch information about X-Pack from the cluster. See the docs for more.
      Parameters:
      request - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • infoAsync

      public org.elasticsearch.client.Cancellable infoAsync​(XPackInfoRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<XPackInfoResponse> listener)
      Asynchronously fetch information about X-Pack from the cluster. See the docs for more.
      Parameters:
      request - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • usage

      public XPackUsageResponse usage​(XPackUsageRequest request, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Fetch usage information about X-Pack features from the cluster.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • usageAsync

      public org.elasticsearch.client.Cancellable usageAsync​(XPackUsageRequest request, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<XPackUsageResponse> listener)
      Asynchronously fetch usage information about X-Pack features from the cluster.
      Parameters:
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request