All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.reactiverse.elasticsearch.client.reactivex.WatcherClient Maven / Gradle / Ivy

There is a newer version: 0.9.0-ec7.10.1
Show newest version
/*
 * Copyright 2014 Red Hat, Inc.
 *
 * Red Hat licenses this file to you under the Apache License, version 2.0
 * (the "License"); you may not use this file except in compliance with the
 * License.  You may obtain a copy of the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
 * License for the specific language governing permissions and limitations
 * under the License.
 */

package io.reactiverse.elasticsearch.client.reactivex;

import java.util.Map;
import io.reactivex.Observable;
import io.reactivex.Flowable;
import io.reactivex.Single;
import io.reactivex.Completable;
import io.reactivex.Maybe;
import org.elasticsearch.client.watcher.DeactivateWatchResponse;
import org.elasticsearch.client.watcher.PutWatchResponse;
import org.elasticsearch.client.watcher.AckWatchRequest;
import org.elasticsearch.client.watcher.StartWatchServiceRequest;
import org.elasticsearch.client.watcher.DeactivateWatchRequest;
import org.elasticsearch.client.watcher.PutWatchRequest;
import org.elasticsearch.client.watcher.WatcherStatsResponse;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.client.watcher.ActivateWatchRequest;
import org.elasticsearch.client.watcher.ExecuteWatchResponse;
import org.elasticsearch.client.watcher.DeleteWatchRequest;
import org.elasticsearch.client.watcher.AckWatchResponse;
import org.elasticsearch.client.watcher.GetWatchRequest;
import org.elasticsearch.client.watcher.GetWatchResponse;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.watcher.StopWatchServiceRequest;
import io.vertx.core.AsyncResult;
import org.elasticsearch.client.watcher.ExecuteWatchRequest;
import io.vertx.core.Handler;
import org.elasticsearch.client.watcher.WatcherStatsRequest;
import org.elasticsearch.client.watcher.DeleteWatchResponse;
import org.elasticsearch.client.watcher.ActivateWatchResponse;


@io.vertx.lang.rx.RxGen(io.reactiverse.elasticsearch.client.WatcherClient.class)
public class WatcherClient {

  @Override
  public String toString() {
    return delegate.toString();
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    WatcherClient that = (WatcherClient) o;
    return delegate.equals(that.delegate);
  }
  
  @Override
  public int hashCode() {
    return delegate.hashCode();
  }

  public static final io.vertx.lang.rx.TypeArg __TYPE_ARG = new io.vertx.lang.rx.TypeArg<>(    obj -> new WatcherClient((io.reactiverse.elasticsearch.client.WatcherClient) obj),
    WatcherClient::getDelegate
  );

  private final io.reactiverse.elasticsearch.client.WatcherClient delegate;
  
  public WatcherClient(io.reactiverse.elasticsearch.client.WatcherClient delegate) {
    this.delegate = delegate;
  }

  public io.reactiverse.elasticsearch.client.WatcherClient getDelegate() {
    return delegate;
  }

  public void startWatchServiceAsync(StartWatchServiceRequest request, RequestOptions options, Handler> handler) { 
    delegate.startWatchServiceAsync(request, options, handler);
  }

  public Single rxStartWatchServiceAsync(StartWatchServiceRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      startWatchServiceAsync(request, options, handler);
    });
  }

  public void stopWatchServiceAsync(StopWatchServiceRequest request, RequestOptions options, Handler> handler) { 
    delegate.stopWatchServiceAsync(request, options, handler);
  }

  public Single rxStopWatchServiceAsync(StopWatchServiceRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      stopWatchServiceAsync(request, options, handler);
    });
  }

  public void putWatchAsync(PutWatchRequest request, RequestOptions options, Handler> handler) { 
    delegate.putWatchAsync(request, options, handler);
  }

  public Single rxPutWatchAsync(PutWatchRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      putWatchAsync(request, options, handler);
    });
  }

  public void getWatchAsync(GetWatchRequest request, RequestOptions options, Handler> handler) { 
    delegate.getWatchAsync(request, options, handler);
  }

  public Single rxGetWatchAsync(GetWatchRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      getWatchAsync(request, options, handler);
    });
  }

  public void deactivateWatchAsync(DeactivateWatchRequest request, RequestOptions options, Handler> handler) { 
    delegate.deactivateWatchAsync(request, options, handler);
  }

  public Single rxDeactivateWatchAsync(DeactivateWatchRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      deactivateWatchAsync(request, options, handler);
    });
  }

  public void deleteWatchAsync(DeleteWatchRequest request, RequestOptions options, Handler> handler) { 
    delegate.deleteWatchAsync(request, options, handler);
  }

  public Single rxDeleteWatchAsync(DeleteWatchRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      deleteWatchAsync(request, options, handler);
    });
  }

  public void ackWatchAsync(AckWatchRequest request, RequestOptions options, Handler> handler) { 
    delegate.ackWatchAsync(request, options, handler);
  }

  public Single rxAckWatchAsync(AckWatchRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      ackWatchAsync(request, options, handler);
    });
  }

  public void activateWatchAsync(ActivateWatchRequest request, RequestOptions options, Handler> handler) { 
    delegate.activateWatchAsync(request, options, handler);
  }

  public Single rxActivateWatchAsync(ActivateWatchRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      activateWatchAsync(request, options, handler);
    });
  }

  public void executeWatchAsync(ExecuteWatchRequest request, RequestOptions options, Handler> handler) { 
    delegate.executeWatchAsync(request, options, handler);
  }

  public Single rxExecuteWatchAsync(ExecuteWatchRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      executeWatchAsync(request, options, handler);
    });
  }

  public void watcherStatsAsync(WatcherStatsRequest request, RequestOptions options, Handler> handler) { 
    delegate.watcherStatsAsync(request, options, handler);
  }

  public Single rxWatcherStatsAsync(WatcherStatsRequest request, RequestOptions options) { 
    return io.vertx.reactivex.impl.AsyncResultSingle.toSingle(handler -> {
      watcherStatsAsync(request, options, handler);
    });
  }


  public static  WatcherClient newInstance(io.reactiverse.elasticsearch.client.WatcherClient arg) {
    return arg != null ? new WatcherClient(arg) : null;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy