vertx / io.vertx.rx.java / RxHelper / toFuture

# toFuture

`open static fun <T : Any> toFuture(observer: Observer<T>): Handler<AsyncResult<T>>`

Adapt a Subscriber as a `Handler<AsyncResult<T>>;`.

### Parameters

`observer` - the subscriber to adapt

Return
a `Handler<AsyncResult<T>>`

`open static fun <T : Any> toFuture(onNext: Action1<T>): Handler<AsyncResult<T>>`

Adapt an item callback as a `Handler<AsyncResult<T>>`.

### Parameters

`onNext` - the `Action1<T>` you have designed to accept the resolution from the `Handler<AsyncResult<T>>`

Return
a `Handler<AsyncResult<T>>`

`open static fun <T : Any> toFuture(onNext: Action1<T>, onError: Action1<Throwable>): Handler<AsyncResult<T>>`

Adapt an item callback and an error callback as a `Handler<AsyncResult<T>>`.

### Parameters

`onNext` - the `Action1<T>` you have designed to accept the resolution from the `Handler<AsyncResult<T>>`

`onError` - the `Action1<Throwable>` you have designed to accept the eventual failure from the `Handler<AsyncResult<T>>`

Return
a `Handler<AsyncResult<T>>`

`open static fun <T : Any> toFuture(onNext: Action1<T>, onError: Action1<Throwable>, onComplete: Action0): Handler<AsyncResult<T>>`

Adapt an item callback and an error callback as a `Handler<AsyncResult<T>>`.

### Parameters

`onNext` - the `Action1<T>` you have designed to accept the resolution from the `Handler<AsyncResult<T>>`

`onError` - the `Action1<Throwable>` you have designed to accept the eventual failure from the `Handler<AsyncResult<T>>`

`onComplete` - the `Action0` you have designed to accept a completion notification from the `Handler<AsyncResult<T>>`

Return
a `Handler<AsyncResult<T>>`