Top Fields Constructors Methods
io.vertx.core.impl.future

public Class CompositeFutureImpl

extends FutureImpl<CompositeFuture>
implements CompositeFuture, Listener<Object>
Class Inheritance
All Implemented Interfaces
io.vertx.core.impl.future.Listener, io.vertx.core.CompositeFuture, io.vertx.core.Future, io.vertx.core.AsyncResult
Imports
io.vertx.core.AsyncResult, .CompositeFuture, .Future, .Handler

Author
Julien Viet

Field Summary

Modifier and TypeField and Description
private Object
private int
private boolean
private final int
private static final int
private static final int
private static final int
private final Future<?>[]

Constructor Summary

AccessConstructor and Description
private
CompositeFutureImpl(int op, boolean initializing, Future<?>... results)

Method Summary

Modifier and TypeMethod and Description
public static CompositeFuture
all(Future<?>... results)

public static CompositeFuture
any(Future<?>... results)

private Object
public Throwable
cause(int
the wrapped future index
index
)

Implements io.vertx.core.CompositeFuture.cause.

Returns a cause of a wrapped future

private void
complete(Object result)

private static CompositeFuture
create(int op, Future<?>... results)

public boolean
failed(int
the wrapped future index
index
)

Implements io.vertx.core.CompositeFuture.failed.

Returns true if a wrapped future is failed

protected void
private <T> Future<T>
future(int index)

private void
init()

public boolean
isComplete(int
the wrapped future index
index
)

Implements io.vertx.core.CompositeFuture.isComplete.

Returns true if a wrapped future is completed

public static CompositeFuture
join(Future<?>... results)

public CompositeFuture
onComplete(Handler<AsyncResult<CompositeFuture>>
the handler that will be called with the result
handler
)

Overrides io.vertx.core.impl.future.FutureImpl.onComplete.

Implements io.vertx.core.CompositeFuture.onComplete, io.vertx.core.Future.onComplete.

Add a handler to be notified of the result.

public void
onFailure(Throwable
the failure
failure
)

Implements io.vertx.core.impl.future.Listener.onFailure.

Signal the failure

public CompositeFuture
onFailure(Handler<Throwable>
the handler that will be called with the failed result
handler
)

Overrides io.vertx.core.impl.future.FutureImpl.onFailure.

Overrides default io.vertx.core.CompositeFuture.onFailure, io.vertx.core.Future.onFailure.

Add a handler to be notified of the failed result.

public void
onSuccess(Object
the value
value
)

Implements io.vertx.core.impl.future.Listener.onSuccess.

Signal the success.

public CompositeFuture
public <T> T
resultAt(int
the wrapped future index
index
)

Implements io.vertx.core.CompositeFuture.resultAt.

Returns the result of a wrapped future

public int
public boolean
succeeded(int
the wrapped future index
index
)

Implements io.vertx.core.CompositeFuture.succeeded.

Returns true if a wrapped future is succeeded

Inherited from io.vertx.core.impl.future.FutureImpl:
addListenercausefailedisCompleteonCompleteremoveListenerresultsucceededtoStringtryCompletetryFail

Field Detail

completedback to summary
private Object completed
completionsback to summary
private int completions
initializingback to summary
private boolean initializing
opback to summary
private final int op
OP_ALLback to summary
private static final int OP_ALL
OP_ANYback to summary
private static final int OP_ANY
OP_JOINback to summary
private static final int OP_JOIN
resultsback to summary
private final Future<?>[] results

Constructor Detail

CompositeFutureImplback to summary
private CompositeFutureImpl(int op, boolean initializing, Future<?>... results)

Method Detail

allback to summary
public static CompositeFuture all(Future<?>... results)
anyback to summary
public static CompositeFuture any(Future<?>... results)
anyFailureOrThisback to summary
private Object anyFailureOrThis()
causeback to summary
public Throwable cause(int index)

Implements io.vertx.core.CompositeFuture.cause.

Doc from io.vertx.core.CompositeFuture.cause.

Returns a cause of a wrapped future

Parameters
index:int

the wrapped future index

Annotations
@Override
completeback to summary
private void complete(Object result)
createback to summary
private static CompositeFuture create(int op, Future<?>... results)
failedback to summary
public boolean failed(int index)

Implements io.vertx.core.CompositeFuture.failed.

Doc from io.vertx.core.CompositeFuture.failed.

Returns true if a wrapped future is failed

Parameters
index:int

the wrapped future index

Annotations
@Override
formatValueback to summary
protected void formatValue(Object value, StringBuilder sb)

Overrides io.vertx.core.impl.future.FutureImpl.formatValue.

Annotations
@Override
futureback to summary
private <T> Future<T> future(int index)
initback to summary
private void init()
isCompleteback to summary
public boolean isComplete(int index)

Implements io.vertx.core.CompositeFuture.isComplete.

Doc from io.vertx.core.CompositeFuture.isComplete.

Returns true if a wrapped future is completed

Parameters
index:int

the wrapped future index

Annotations
@Override
joinback to summary
public static CompositeFuture join(Future<?>... results)
onCompleteback to summary
public CompositeFuture onComplete(Handler<AsyncResult<CompositeFuture>> handler)

Overrides io.vertx.core.impl.future.FutureImpl.onComplete.

Implements io.vertx.core.CompositeFuture.onComplete, io.vertx.core.Future.onComplete.

Doc from io.vertx.core.Future.onComplete.

Add a handler to be notified of the result.

Warning

this is a terminal operation. If several handlers are registered, there is no guarantee that they will be invoked in order of registration.

Parameters
handler:Handler<AsyncResult<CompositeFuture>>

the handler that will be called with the result

Returns:CompositeFuture

a reference to this, so it can be used fluently

Annotations
@Override
onFailureback to summary
public void onFailure(Throwable failure)

Implements io.vertx.core.impl.future.Listener.onFailure.

Doc from io.vertx.core.impl.future.Listener.onFailure.

Signal the failure

Parameters
failure:Throwable

the failure

Annotations
@Override
onFailureback to summary
public CompositeFuture onFailure(Handler<Throwable> handler)

Overrides io.vertx.core.impl.future.FutureImpl.onFailure.

Overrides default io.vertx.core.CompositeFuture.onFailure, io.vertx.core.Future.onFailure.

Doc from io.vertx.core.Future.onFailure.

Add a handler to be notified of the failed result.

Warning

this is a terminal operation. If several handlers are registered, there is no guarantee that they will be invoked in order of registration.

Parameters
handler:Handler<Throwable>

the handler that will be called with the failed result

Returns:CompositeFuture

a reference to this, so it can be used fluently

Annotations
@Override
onSuccessback to summary
public void onSuccess(Object value)

Implements io.vertx.core.impl.future.Listener.onSuccess.

Doc from io.vertx.core.impl.future.Listener.onSuccess.

Signal the success.

Parameters
value:Object

the value

Annotations
@Override
onSuccessback to summary
public CompositeFuture onSuccess(Handler<CompositeFuture> handler)

Overrides io.vertx.core.impl.future.FutureImpl.onSuccess.

Overrides default io.vertx.core.CompositeFuture.onSuccess, io.vertx.core.Future.onSuccess.

Implements io.vertx.core.impl.future.Listener.onSuccess.

Doc from io.vertx.core.impl.future.Listener.onSuccess.

Signal the success.

Parameters
handler:Handler<CompositeFuture>

the value

Returns:CompositeFuture

Doc from io.vertx.core.Future.onSuccess.

a reference to this, so it can be used fluently

Annotations
@Override
resultAtback to summary
public <T> T resultAt(int index)

Implements io.vertx.core.CompositeFuture.resultAt.

Doc from io.vertx.core.CompositeFuture.resultAt.

Returns the result of a wrapped future

Parameters
index:int

the wrapped future index

Annotations
@Override
sizeback to summary
public int size()

Implements io.vertx.core.CompositeFuture.size.

Returns:int

Doc from io.vertx.core.CompositeFuture.size.

the number of wrapped future

Annotations
@Override
succeededback to summary
public boolean succeeded(int index)

Implements io.vertx.core.CompositeFuture.succeeded.

Doc from io.vertx.core.CompositeFuture.succeeded.

Returns true if a wrapped future is succeeded

Parameters
index:int

the wrapped future index

Annotations
@Override