Java io.vertx.core Future fields, constructors, methods, implement or subclass

Example usage for Java io.vertx.core Future fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for io.vertx.core Future.

The text is from its open source code.

Implementation

io.vertx.core.Future has the following implementations.
Click this link to see all its implementation.

Constructor

Method

Throwablecause()
A Throwable describing failure.
Futurecompose(Function> mapper)
Compose this future with a mapper function.

When this future (the one on which compose is called) succeeds, the mapper will be called with the completed value and this mapper returns another future object.

Futurecompose(Function> successMapper, Function> failureMapper)
Compose this future with a successMapper and failureMapper functions.

When this future (the one on which compose is called) succeeds, the successMapper will be called with the completed value and this mapper returns another future object.

booleanfailed()
Did it fail?
FuturefailedFuture(Throwable t)
Create a failed future with the specified failure cause.
FuturefailedFuture(String failureMessage)
Create a failed future with the specified failure message.
booleanisComplete()
Has the future completed?
Futuremap(Function mapper)
Apply a mapper function on this future.

When this future succeeds, the mapper will be called with the completed value and this mapper returns a value.

Futuremap(V value)
Map the result of a future to a specific value .

When this future succeeds, this value will complete the future returned by this method call.

When this future fails, the failure will be propagated to the returned future.

FutureotherwiseEmpty()
Map the failure of a future to null .

This is a convenience for future.otherwise((T) null) .

When this future fails, the null value will complete the future returned by this method call.

When this future succeeds, the result will be propagated to the returned future.

Tresult()
The result of the operation.
FuturesetHandler(Handler> handler)
Like #onComplete(Handler) .
booleansucceeded()
Did it succeed?
FuturesucceededFuture(T result)
Created a succeeded future with the specified result.
FuturesucceededFuture()
Create a succeeded future with a null result