/** * Set a handler for the result. * <p> * If the future has already been completed it will be called immediately. Otherwise it will be called when the * future is completed. * @return a reference to this, so it can be used fluently * @deprecated use {@link #rxSetHandler} instead */ @Deprecated() public Observable<Boolean> setHandlerObservable() { io.vertx.rx.java.ObservableFuture<Boolean> handler = io.vertx.rx.java.RxHelper.observableFuture(); setHandler(handler.toHandler()); return handler; }
/** * Set a handler for the result. * <p> * If the future has already been completed it will be called immediately. Otherwise it will be called when the * future is completed. * @return a reference to this, so it can be used fluently */ public Single<Boolean> rxSetHandler() { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { setHandler(fut); })); }
/** * Set a handler for the result. * <p> * If the future has already been completed it will be called immediately. Otherwise it will be called when the * future is completed. * @return a reference to this, so it can be used fluently */ public Single<Boolean> rxSetHandler() { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { setHandler(fut); })); }