/** * Like {@link io.vertx.rxjava.core.http.HttpServerResponse#sendFile} but providing a handler which will be notified once the file has been completely * written to the wire. * @param filename path to the file to serve * @param offset the offset to serve from * @return a reference to this, so the API can be used fluently * @deprecated use {@link #rxSendFile} instead */ @Deprecated() public Observable<Void> sendFileObservable(String filename, long offset) { io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture(); sendFile(filename, offset, resultHandler.toHandler()); return resultHandler; }
/** * Like {@link io.vertx.rxjava.core.http.HttpServerResponse#sendFile} but providing a handler which will be notified once the file has been completely * written to the wire. * @param filename path to the file to serve * @return a reference to this, so the API can be used fluently * @deprecated use {@link #rxSendFile} instead */ @Deprecated() public Observable<Void> sendFileObservable(String filename) { io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture(); sendFile(filename, resultHandler.toHandler()); return resultHandler; }
/** * Like {@link io.vertx.rxjava.core.http.HttpServerResponse#sendFile} but providing a handler which will be notified once the file has been completely * written to the wire. * @param filename path to the file to serve * @param offset the offset to serve from * @return a reference to this, so the API can be used fluently */ public Single<Void> rxSendFile(String filename, long offset) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { sendFile(filename, offset, fut); })); }
/** * Like {@link io.vertx.rxjava.core.http.HttpServerResponse#sendFile} but providing a handler which will be notified once the file has been * completely written to the wire. * @param filename path to the file to serve * @param offset the offset to serve from * @param length the length to serve to * @return a reference to this, so the API can be used fluently */ public Single<Void> rxSendFile(String filename, long offset, long length) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { sendFile(filename, offset, length, fut); })); }
/** * Like {@link io.vertx.rxjava.core.http.HttpServerResponse#sendFile} but providing a handler which will be notified once the file has been * completely written to the wire. * @param filename path to the file to serve * @param offset the offset to serve from * @param length the length to serve to * @return a reference to this, so the API can be used fluently * @deprecated use {@link #rxSendFile} instead */ @Deprecated() public Observable<Void> sendFileObservable(String filename, long offset, long length) { io.vertx.rx.java.ObservableFuture<Void> resultHandler = io.vertx.rx.java.RxHelper.observableFuture(); sendFile(filename, offset, length, resultHandler.toHandler()); return resultHandler; }
/** * Like {@link io.vertx.rxjava.core.http.HttpServerResponse#sendFile} but providing a handler which will be notified once the file has been completely * written to the wire. * @param filename path to the file to serve * @return a reference to this, so the API can be used fluently */ public Single<Void> rxSendFile(String filename) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { sendFile(filename, fut); })); }
/** * Like {@link io.vertx.rxjava.core.http.HttpServerResponse#sendFile} but providing a handler which will be notified once the file has been * completely written to the wire. * @param filename path to the file to serve * @param offset the offset to serve from * @param length the length to serve to * @return a reference to this, so the API can be used fluently */ public Single<Void> rxSendFile(String filename, long offset, long length) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { sendFile(filename, offset, length, fut); })); }
/** * Like {@link io.vertx.rxjava.core.http.HttpServerResponse#sendFile} but providing a handler which will be notified once the file has been completely * written to the wire. * @param filename path to the file to serve * @return a reference to this, so the API can be used fluently */ public Single<Void> rxSendFile(String filename) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { sendFile(filename, fut); })); }
/** * Like {@link io.vertx.rxjava.core.http.HttpServerResponse#sendFile} but providing a handler which will be notified once the file has been completely * written to the wire. * @param filename path to the file to serve * @param offset the offset to serve from * @return a reference to this, so the API can be used fluently */ public Single<Void> rxSendFile(String filename, long offset) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> { sendFile(filename, offset, fut); })); }