io.reactiverse.elasticsearch.client.RollupClientImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of elasticsearch-client-rxjava2 Show documentation
Show all versions of elasticsearch-client-rxjava2 Show documentation
Reactiverse Elasticsearch client :: RxJava2 bindings
/*
[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.rollup.GetRollupJobRequest;
import org.elasticsearch.client.rollup.GetRollupJobResponse;
import org.elasticsearch.client.rollup.GetRollupCapsRequest;
import org.elasticsearch.client.rollup.GetRollupCapsResponse;
import org.elasticsearch.client.rollup.PutRollupJobRequest;
import org.elasticsearch.client.rollup.PutRollupJobResponse;
import java.io.IOException;
import java.util.Collections;
class RollupClientImpl implements RollupClient {
private final Vertx vertx;
private final org.elasticsearch.client.RollupClient delegate;
RollupClientImpl(Vertx vertx, org.elasticsearch.client.RollupClient delegate) {
this.vertx = vertx;
this.delegate = delegate;
}
@Override()
public void putRollupJobAsync(PutRollupJobRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.putRollupJobAsync(request, options, new ActionListener() {
@Override
public void onResponse(PutRollupJobResponse 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 getRollupJobAsync(GetRollupJobRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getRollupJobAsync(request, options, new ActionListener() {
@Override
public void onResponse(GetRollupJobResponse 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 getRollupCapabilitiesAsync(GetRollupCapsRequest request, RequestOptions options, Handler> handler) {
Context context = vertx.getOrCreateContext();
delegate.getRollupCapabilitiesAsync(request, options, new ActionListener() {
@Override
public void onResponse(GetRollupCapsResponse value) {
context.runOnContext(v -> handler.handle(Future.succeededFuture(value)));
}
@Override
public void onFailure(Exception e) {
context.runOnContext(v -> handler.handle(Future.failedFuture(e)));
}
});
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy