io.reactiverse.elasticsearch.client.DataFrameClientImpl 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.elasticsearch.action.ActionListener;
import org.elasticsearch.client.core.AcknowledgedResponse;
import org.elasticsearch.client.dataframe.DeleteDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.GetDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.GetDataFrameTransformResponse;
import org.elasticsearch.client.dataframe.GetDataFrameTransformStatsRequest;
import org.elasticsearch.client.dataframe.GetDataFrameTransformStatsResponse;
import org.elasticsearch.client.dataframe.PreviewDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.PreviewDataFrameTransformResponse;
import org.elasticsearch.client.dataframe.PutDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.StartDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.StartDataFrameTransformResponse;
import org.elasticsearch.client.dataframe.StopDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.StopDataFrameTransformResponse;
import org.elasticsearch.client.dataframe.UpdateDataFrameTransformRequest;
import org.elasticsearch.client.dataframe.UpdateDataFrameTransformResponse;
import java.io.IOException;
import java.util.Collections;
class DataFrameClientImpl implements DataFrameClient {
private final Vertx vertx;
private final org.elasticsearch.client.DataFrameClient delegate;
DataFrameClientImpl(Vertx vertx, org.elasticsearch.client.DataFrameClient delegate) {
this.vertx = vertx;
this.delegate = delegate;
}
@Override()
public void putDataFrameTransformAsync(PutDataFrameTransformRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.putDataFrameTransformAsync(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 updateDataFrameTransformAsync(UpdateDataFrameTransformRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.updateDataFrameTransformAsync(request, options, new ActionListener() {
@Override
public void onResponse(UpdateDataFrameTransformResponse 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 getDataFrameTransformStatsAsync(GetDataFrameTransformStatsRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getDataFrameTransformStatsAsync(request, options, new ActionListener() {
@Override
public void onResponse(GetDataFrameTransformStatsResponse 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 deleteDataFrameTransformAsync(DeleteDataFrameTransformRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.deleteDataFrameTransformAsync(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 previewDataFrameTransformAsync(PreviewDataFrameTransformRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.previewDataFrameTransformAsync(request, options, new ActionListener() {
@Override
public void onResponse(PreviewDataFrameTransformResponse 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 startDataFrameTransformAsync(StartDataFrameTransformRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.startDataFrameTransformAsync(request, options, new ActionListener() {
@Override
public void onResponse(StartDataFrameTransformResponse 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 stopDataFrameTransformAsync(StopDataFrameTransformRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.stopDataFrameTransformAsync(request, options, new ActionListener() {
@Override
public void onResponse(StopDataFrameTransformResponse 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 getDataFrameTransformAsync(GetDataFrameTransformRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getDataFrameTransformAsync(request, options, new ActionListener() {
@Override
public void onResponse(GetDataFrameTransformResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
}