io.reactiverse.elasticsearch.client.RestHighLevelClientImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticsearch-client Show documentation
Show all versions of elasticsearch-client Show documentation
Reactiverse Elasticsearch client
/*
[NOTE] This is an automatically generated file.
Do not make changes to this file but to the shim code generator.
*/
package io.reactiverse.elasticsearch.client;
import io.vertx.core.*;
import org.elasticsearch.client.*;
import org.apache.http.HttpEntity;
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.ElasticsearchStatusException;
import org.elasticsearch.action.ActionListener;
import org.elasticsearch.action.ActionRequest;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
import org.elasticsearch.action.admin.cluster.storedscripts.DeleteStoredScriptRequest;
import org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptRequest;
import org.elasticsearch.action.admin.cluster.storedscripts.GetStoredScriptResponse;
import org.elasticsearch.action.admin.cluster.storedscripts.PutStoredScriptRequest;
import org.elasticsearch.action.bulk.BulkRequest;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.action.delete.DeleteRequest;
import org.elasticsearch.action.delete.DeleteResponse;
import org.elasticsearch.action.explain.ExplainRequest;
import org.elasticsearch.action.explain.ExplainResponse;
import org.elasticsearch.action.fieldcaps.FieldCapabilitiesRequest;
import org.elasticsearch.action.fieldcaps.FieldCapabilitiesResponse;
import org.elasticsearch.action.get.GetRequest;
import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.get.MultiGetRequest;
import org.elasticsearch.action.get.MultiGetResponse;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.action.search.ClearScrollRequest;
import org.elasticsearch.action.search.ClearScrollResponse;
import org.elasticsearch.action.search.MultiSearchRequest;
import org.elasticsearch.action.search.MultiSearchResponse;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.search.SearchScrollRequest;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.client.core.CountRequest;
import org.elasticsearch.client.core.CountResponse;
import org.elasticsearch.client.core.MainRequest;
import org.elasticsearch.client.core.MainResponse;
import org.elasticsearch.client.core.MultiTermVectorsRequest;
import org.elasticsearch.client.core.MultiTermVectorsResponse;
import org.elasticsearch.client.core.TermVectorsRequest;
import org.elasticsearch.client.core.TermVectorsResponse;
import org.elasticsearch.client.tasks.TaskSubmissionResponse;
import org.elasticsearch.common.CheckedConsumer;
import org.elasticsearch.common.CheckedFunction;
import org.elasticsearch.common.ParseField;
import org.elasticsearch.common.xcontent.ContextParser;
import org.elasticsearch.common.xcontent.DeprecationHandler;
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.rankeval.RankEvalRequest;
import org.elasticsearch.index.rankeval.RankEvalResponse;
import org.elasticsearch.index.reindex.BulkByScrollResponse;
import org.elasticsearch.index.reindex.DeleteByQueryRequest;
import org.elasticsearch.index.reindex.ReindexRequest;
import org.elasticsearch.index.reindex.UpdateByQueryRequest;
import org.elasticsearch.plugins.spi.NamedXContentProvider;
import org.elasticsearch.rest.BytesRestResponse;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.script.mustache.MultiSearchTemplateRequest;
import org.elasticsearch.script.mustache.MultiSearchTemplateResponse;
import org.elasticsearch.script.mustache.SearchTemplateRequest;
import org.elasticsearch.script.mustache.SearchTemplateResponse;
import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.bucket.adjacency.AdjacencyMatrixAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.adjacency.ParsedAdjacencyMatrix;
import org.elasticsearch.search.aggregations.bucket.composite.CompositeAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.composite.ParsedComposite;
import org.elasticsearch.search.aggregations.bucket.filter.FilterAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.filter.FiltersAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.filter.ParsedFilter;
import org.elasticsearch.search.aggregations.bucket.filter.ParsedFilters;
import org.elasticsearch.search.aggregations.bucket.geogrid.GeoHashGridAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.geogrid.GeoTileGridAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.geogrid.ParsedGeoHashGrid;
import org.elasticsearch.search.aggregations.bucket.geogrid.ParsedGeoTileGrid;
import org.elasticsearch.search.aggregations.bucket.global.GlobalAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.global.ParsedGlobal;
import org.elasticsearch.search.aggregations.bucket.histogram.AutoDateHistogramAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.histogram.HistogramAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.histogram.ParsedAutoDateHistogram;
import org.elasticsearch.search.aggregations.bucket.histogram.ParsedDateHistogram;
import org.elasticsearch.search.aggregations.bucket.histogram.ParsedHistogram;
import org.elasticsearch.search.aggregations.bucket.missing.MissingAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.missing.ParsedMissing;
import org.elasticsearch.search.aggregations.bucket.nested.NestedAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.nested.ParsedNested;
import org.elasticsearch.search.aggregations.bucket.nested.ParsedReverseNested;
import org.elasticsearch.search.aggregations.bucket.nested.ReverseNestedAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.range.DateRangeAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.range.GeoDistanceAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.range.IpRangeAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.range.ParsedBinaryRange;
import org.elasticsearch.search.aggregations.bucket.range.ParsedDateRange;
import org.elasticsearch.search.aggregations.bucket.range.ParsedGeoDistance;
import org.elasticsearch.search.aggregations.bucket.range.ParsedRange;
import org.elasticsearch.search.aggregations.bucket.range.RangeAggregationBuilder;
import org.elasticsearch.search.aggregations.bucket.sampler.InternalSampler;
import org.elasticsearch.search.aggregations.bucket.sampler.ParsedSampler;
import org.elasticsearch.search.aggregations.bucket.significant.ParsedSignificantLongTerms;
import org.elasticsearch.search.aggregations.bucket.significant.ParsedSignificantStringTerms;
import org.elasticsearch.search.aggregations.bucket.significant.SignificantLongTerms;
import org.elasticsearch.search.aggregations.bucket.significant.SignificantStringTerms;
import org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms;
import org.elasticsearch.search.aggregations.bucket.terms.LongTerms;
import org.elasticsearch.search.aggregations.bucket.terms.ParsedDoubleTerms;
import org.elasticsearch.search.aggregations.bucket.terms.ParsedLongTerms;
import org.elasticsearch.search.aggregations.bucket.terms.ParsedStringTerms;
import org.elasticsearch.search.aggregations.bucket.terms.StringTerms;
import org.elasticsearch.search.aggregations.metrics.AvgAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.CardinalityAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.ExtendedStatsAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.GeoBoundsAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.GeoCentroidAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.InternalHDRPercentileRanks;
import org.elasticsearch.search.aggregations.metrics.InternalHDRPercentiles;
import org.elasticsearch.search.aggregations.metrics.InternalTDigestPercentileRanks;
import org.elasticsearch.search.aggregations.metrics.InternalTDigestPercentiles;
import org.elasticsearch.search.aggregations.metrics.MaxAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.MedianAbsoluteDeviationAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.MinAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.ParsedAvg;
import org.elasticsearch.search.aggregations.metrics.ParsedCardinality;
import org.elasticsearch.search.aggregations.metrics.ParsedExtendedStats;
import org.elasticsearch.search.aggregations.metrics.ParsedGeoBounds;
import org.elasticsearch.search.aggregations.metrics.ParsedGeoCentroid;
import org.elasticsearch.search.aggregations.metrics.ParsedHDRPercentileRanks;
import org.elasticsearch.search.aggregations.metrics.ParsedHDRPercentiles;
import org.elasticsearch.search.aggregations.metrics.ParsedMax;
import org.elasticsearch.search.aggregations.metrics.ParsedMedianAbsoluteDeviation;
import org.elasticsearch.search.aggregations.metrics.ParsedMin;
import org.elasticsearch.search.aggregations.metrics.ParsedScriptedMetric;
import org.elasticsearch.search.aggregations.metrics.ParsedStats;
import org.elasticsearch.search.aggregations.metrics.ParsedSum;
import org.elasticsearch.search.aggregations.metrics.ParsedTDigestPercentileRanks;
import org.elasticsearch.search.aggregations.metrics.ParsedTDigestPercentiles;
import org.elasticsearch.search.aggregations.metrics.ParsedTopHits;
import org.elasticsearch.search.aggregations.metrics.ParsedValueCount;
import org.elasticsearch.search.aggregations.metrics.ParsedWeightedAvg;
import org.elasticsearch.search.aggregations.metrics.ScriptedMetricAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.StatsAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.SumAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.TopHitsAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.ValueCountAggregationBuilder;
import org.elasticsearch.search.aggregations.metrics.WeightedAvgAggregationBuilder;
import org.elasticsearch.search.aggregations.pipeline.DerivativePipelineAggregationBuilder;
import org.elasticsearch.search.aggregations.pipeline.ExtendedStatsBucketPipelineAggregationBuilder;
import org.elasticsearch.search.aggregations.pipeline.InternalBucketMetricValue;
import org.elasticsearch.search.aggregations.pipeline.InternalSimpleValue;
import org.elasticsearch.search.aggregations.pipeline.ParsedBucketMetricValue;
import org.elasticsearch.search.aggregations.pipeline.ParsedDerivative;
import org.elasticsearch.search.aggregations.pipeline.ParsedExtendedStatsBucket;
import org.elasticsearch.search.aggregations.pipeline.ParsedPercentilesBucket;
import org.elasticsearch.search.aggregations.pipeline.ParsedSimpleValue;
import org.elasticsearch.search.aggregations.pipeline.ParsedStatsBucket;
import org.elasticsearch.search.aggregations.pipeline.PercentilesBucketPipelineAggregationBuilder;
import org.elasticsearch.search.aggregations.pipeline.StatsBucketPipelineAggregationBuilder;
import org.elasticsearch.search.suggest.Suggest;
import org.elasticsearch.search.suggest.completion.CompletionSuggestion;
import org.elasticsearch.search.suggest.completion.CompletionSuggestionBuilder;
import org.elasticsearch.search.suggest.phrase.PhraseSuggestion;
import org.elasticsearch.search.suggest.phrase.PhraseSuggestionBuilder;
import org.elasticsearch.search.suggest.term.TermSuggestion;
import org.elasticsearch.search.suggest.term.TermSuggestionBuilder;
import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.ServiceLoader;
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static java.util.Collections.emptySet;
import static java.util.Collections.singleton;
import static java.util.stream.Collectors.toList;
class RestHighLevelClientImpl implements RestHighLevelClient {
RestHighLevelClientImpl(Vertx vertx, RestClientBuilder restClientBuilder) {
this.vertx = vertx;
this.restClientBuilder = restClientBuilder;
this.delegate = new org.elasticsearch.client.RestHighLevelClient(restClientBuilder);
}
private final Vertx vertx;
private final RestClientBuilder restClientBuilder;
private final org.elasticsearch.client.RestHighLevelClient delegate;
@Override()
public void close() {
try {
delegate.close();
} catch (Throwable t) {
throw new RuntimeException(t);
}
}
@Override()
public IndicesClient indices() {
return new IndicesClientImpl(vertx, delegate.indices());
}
@Override()
public ClusterClient cluster() {
return new ClusterClientImpl(vertx, delegate.cluster());
}
@Override()
public IngestClient ingest() {
return new IngestClientImpl(vertx, delegate.ingest());
}
@Override()
public SnapshotClient snapshot() {
return new SnapshotClientImpl(vertx, delegate.snapshot());
}
@Override()
public RollupClient rollup() {
return new RollupClientImpl(vertx, delegate.rollup());
}
@Override()
public CcrClient ccr() {
return new CcrClientImpl(vertx, delegate.ccr());
}
@Override()
public TasksClient tasks() {
return new TasksClientImpl(vertx, delegate.tasks());
}
@Override()
public XPackClient xpack() {
return new XPackClientImpl(vertx, delegate.xpack());
}
@Override()
public WatcherClient watcher() {
return new WatcherClientImpl(vertx, delegate.watcher());
}
@Override()
public GraphClient graph() {
return new GraphClientImpl(vertx, delegate.graph());
}
@Override()
public LicenseClient license() {
return new LicenseClientImpl(vertx, delegate.license());
}
@Override()
public IndexLifecycleClient indexLifecycle() {
return new IndexLifecycleClientImpl(vertx, delegate.indexLifecycle());
}
@Override()
public MachineLearningClient machineLearning() {
return new MachineLearningClientImpl(vertx, delegate.machineLearning());
}
@Override()
public SecurityClient security() {
return new SecurityClientImpl(vertx, delegate.security());
}
@Override()
public TransformClient transform() {
return new TransformClientImpl(vertx, delegate.transform());
}
@Override()
public EnrichClient enrich() {
return new EnrichClientImpl(vertx, delegate.enrich());
}
@Override()
public void bulkAsync(BulkRequest bulkRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.bulkAsync(bulkRequest, options, new ActionListener() {
@Override
public void onResponse(BulkResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void reindexAsync(ReindexRequest reindexRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.reindexAsync(reindexRequest, options, new ActionListener() {
@Override
public void onResponse(BulkByScrollResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void updateByQueryAsync(UpdateByQueryRequest updateByQueryRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.updateByQueryAsync(updateByQueryRequest, options, new ActionListener() {
@Override
public void onResponse(BulkByScrollResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void deleteByQueryAsync(DeleteByQueryRequest deleteByQueryRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.deleteByQueryAsync(deleteByQueryRequest, options, new ActionListener() {
@Override
public void onResponse(BulkByScrollResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void deleteByQueryRethrottleAsync(RethrottleRequest rethrottleRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.deleteByQueryRethrottleAsync(rethrottleRequest, options, new ActionListener() {
@Override
public void onResponse(ListTasksResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void updateByQueryRethrottleAsync(RethrottleRequest rethrottleRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.updateByQueryRethrottleAsync(rethrottleRequest, options, new ActionListener() {
@Override
public void onResponse(ListTasksResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void reindexRethrottleAsync(RethrottleRequest rethrottleRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.reindexRethrottleAsync(rethrottleRequest, options, new ActionListener() {
@Override
public void onResponse(ListTasksResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void getAsync(GetRequest getRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getAsync(getRequest, options, new ActionListener() {
@Override
public void onResponse(GetResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void mgetAsync(MultiGetRequest multiGetRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.mgetAsync(multiGetRequest, options, new ActionListener() {
@Override
public void onResponse(MultiGetResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void existsAsync(GetRequest getRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.existsAsync(getRequest, options, new ActionListener() {
@Override
public void onResponse(Boolean value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void existsSourceAsync(GetRequest getRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.existsSourceAsync(getRequest, options, new ActionListener() {
@Override
public void onResponse(Boolean value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void indexAsync(IndexRequest indexRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.indexAsync(indexRequest, options, new ActionListener() {
@Override
public void onResponse(IndexResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void countAsync(CountRequest countRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.countAsync(countRequest, options, new ActionListener() {
@Override
public void onResponse(CountResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void updateAsync(UpdateRequest updateRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.updateAsync(updateRequest, options, new ActionListener() {
@Override
public void onResponse(UpdateResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void deleteAsync(DeleteRequest deleteRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.deleteAsync(deleteRequest, options, new ActionListener() {
@Override
public void onResponse(DeleteResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void searchAsync(SearchRequest searchRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.searchAsync(searchRequest, options, new ActionListener() {
@Override
public void onResponse(SearchResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void msearchAsync(MultiSearchRequest searchRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.msearchAsync(searchRequest, options, new ActionListener() {
@Override
public void onResponse(MultiSearchResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void scrollAsync(SearchScrollRequest searchScrollRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.scrollAsync(searchScrollRequest, options, new ActionListener() {
@Override
public void onResponse(SearchResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void clearScrollAsync(ClearScrollRequest clearScrollRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.clearScrollAsync(clearScrollRequest, options, new ActionListener() {
@Override
public void onResponse(ClearScrollResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void searchTemplateAsync(SearchTemplateRequest searchTemplateRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.searchTemplateAsync(searchTemplateRequest, options, new ActionListener() {
@Override
public void onResponse(SearchTemplateResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void explainAsync(ExplainRequest explainRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.explainAsync(explainRequest, options, new ActionListener() {
@Override
public void onResponse(ExplainResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void termvectorsAsync(TermVectorsRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.termvectorsAsync(request, options, new ActionListener() {
@Override
public void onResponse(TermVectorsResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void mtermvectorsAsync(MultiTermVectorsRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.mtermvectorsAsync(request, options, new ActionListener() {
@Override
public void onResponse(MultiTermVectorsResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void msearchTemplateAsync(MultiSearchTemplateRequest multiSearchTemplateRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.msearchTemplateAsync(multiSearchTemplateRequest, options, new ActionListener() {
@Override
public void onResponse(MultiSearchTemplateResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void rankEvalAsync(RankEvalRequest rankEvalRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.rankEvalAsync(rankEvalRequest, options, new ActionListener() {
@Override
public void onResponse(RankEvalResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void getScriptAsync(GetStoredScriptRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getScriptAsync(request, options, new ActionListener() {
@Override
public void onResponse(GetStoredScriptResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void deleteScriptAsync(DeleteStoredScriptRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.deleteScriptAsync(request, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void putScriptAsync(PutStoredScriptRequest putStoredScriptRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.putScriptAsync(putStoredScriptRequest, options, new ActionListener() {
@Override
public void onResponse(AcknowledgedResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
@Override()
public void fieldCapsAsync(FieldCapabilitiesRequest fieldCapabilitiesRequest, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.fieldCapsAsync(fieldCapabilitiesRequest, options, new ActionListener() {
@Override
public void onResponse(FieldCapabilitiesResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
}