io.vertx.rxjava.core

## Class CompositeFuture

- java.lang.Object
- - io.vertx.rxjava.core.Future<CompositeFuture>
  - - io.vertx.rxjava.core.CompositeFuture

-     public class CompositeFuture
      extends Future<CompositeFuture>

  The composite future wraps a list of `futures`, it is useful when several futures needs to be coordinated.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompositeFuture(CompositeFuture delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T1,T2> CompositeFuture` | `all(Future<T1> f1, Future<T2> f2)` Return a composite future, succeeded when all futures are succeeded, failed when any future is failed.
    `static <T1,T2,T3> CompositeFuture` | `all(Future<T1> f1, Future<T2> f2, Future<T3> f3)` Like `all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 3 futures.
    `static <T1,T2,T3,T4> CompositeFuture` | `all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)` Like `all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 4 futures.
    `static <T1,T2,T3,T4,T5> CompositeFuture` | `all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)` Like `all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 5 futures.
    `static <T1,T2,T3,T4,T5,T6> CompositeFuture` | `all(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5, Future<T6> f6)` Like `all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 6 futures.
    `static CompositeFuture` | `all(List<Future> futures)` Like `all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with a list of futures.
    `static <T1,T2> CompositeFuture` | `any(Future<T1> f1, Future<T2> f2)` Return a composite future, succeeded when any futures is succeeded, failed when all futures are failed.
    `static <T1,T2,T3> CompositeFuture` | `any(Future<T1> f1, Future<T2> f2, Future<T3> f3)` Like `any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 3 futures.
    `static <T1,T2,T3,T4> CompositeFuture` | `any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4)` Like `any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 4 futures.
    `static <T1,T2,T3,T4,T5> CompositeFuture` | `any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5)` Like `any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 5 futures.
    `static <T1,T2,T3,T4,T5,T6> CompositeFuture` | `any(Future<T1> f1, Future<T2> f2, Future<T3> f3, Future<T4> f4, Future<T5> f5, Future<T6> f6)` Like `any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 6 futures.
    `static CompositeFuture` | `any(List<Future> futures)` Like `any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with a list of futures.
    `Throwable` | `cause(int index)` Returns a cause of a wrapped future
    `boolean` | `failed(int index)` Returns true if a wrapped future is failed
    `Object` | `getDelegate()`
    `boolean` | `isComplete(int index)` Returns true if a wrapped future is completed
    `static CompositeFuture` | `newInstance(CompositeFuture arg)`
    `<T> T` | `result(int index)` Returns the result of a wrapped future
    `CompositeFuture` | `setHandler(Handler<AsyncResult<CompositeFuture>> handler)` Set a handler for the result.
    `Observable<CompositeFuture>` | `setHandlerObservable()` Set a handler for the result.
    `int` | `size()`
    `boolean` | `succeeded(int index)` Returns true if a wrapped future is succeeded

    - ### Methods inherited from class io.vertx.rxjava.core.Future

      `cause, complete, complete, completer, compose, compose, fail, fail, failed, failedFuture, future, isComplete, map, map, newInstance, result, succeeded, succeededFuture, succeededFuture`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CompositeFuture

          public CompositeFuture(CompositeFuture delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

      Overrides:
        `getDelegate` in class `Future<CompositeFuture>`

    - #### all

          public static <T1,T2> CompositeFuture all(Future<T1> f1,
                                                    Future<T2> f2)

      Return a composite future, succeeded when all futures are succeeded, failed when any future is failed.

      The returned future fails as soon as one of `f1` or `f2` fails.
      Parameters:
        `f1` - future
        `f2` - future
      Returns:
        the composite future

    - #### all

          public static <T1,T2,T3> CompositeFuture all(Future<T1> f1,
                                                       Future<T2> f2,
                                                       Future<T3> f3)

      Like `all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 3 futures.
      Parameters:
        `f1` -
        `f2` -
        `f3` -
      Returns:

    - #### all

          public static <T1,T2,T3,T4> CompositeFuture all(Future<T1> f1,
                                                          Future<T2> f2,
                                                          Future<T3> f3,
                                                          Future<T4> f4)

      Like `all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 4 futures.
      Parameters:
        `f1` -
        `f2` -
        `f3` -
        `f4` -
      Returns:

    - #### all

          public static <T1,T2,T3,T4,T5> CompositeFuture all(Future<T1> f1,
                                                             Future<T2> f2,
                                                             Future<T3> f3,
                                                             Future<T4> f4,
                                                             Future<T5> f5)

      Like `all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 5 futures.
      Parameters:
        `f1` -
        `f2` -
        `f3` -
        `f4` -
        `f5` -
      Returns:

    - #### all

          public static <T1,T2,T3,T4,T5,T6> CompositeFuture all(Future<T1> f1,
                                                                Future<T2> f2,
                                                                Future<T3> f3,
                                                                Future<T4> f4,
                                                                Future<T5> f5,
                                                                Future<T6> f6)

      Like `all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 6 futures.
      Parameters:
        `f1` -
        `f2` -
        `f3` -
        `f4` -
        `f5` -
        `f6` -
      Returns:

    - #### all

          public static CompositeFuture all(List<Future> futures)

      Like `all(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with a list of futures.

      When the list is empty, the returned future will be already completed.

      Parameters:
        `futures` -
      Returns:

    - #### any

          public static <T1,T2> CompositeFuture any(Future<T1> f1,
                                                    Future<T2> f2)

      Return a composite future, succeeded when any futures is succeeded, failed when all futures are failed.

      The returned future succeeds as soon as one of `f1` or `f2` succeeds.
      Parameters:
        `f1` - future
        `f2` - future
      Returns:
        the composite future

    - #### any

          public static <T1,T2,T3> CompositeFuture any(Future<T1> f1,
                                                       Future<T2> f2,
                                                       Future<T3> f3)

      Like `any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 3 futures.
      Parameters:
        `f1` -
        `f2` -
        `f3` -
      Returns:

    - #### any

          public static <T1,T2,T3,T4> CompositeFuture any(Future<T1> f1,
                                                          Future<T2> f2,
                                                          Future<T3> f3,
                                                          Future<T4> f4)

      Like `any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 4 futures.
      Parameters:
        `f1` -
        `f2` -
        `f3` -
        `f4` -
      Returns:

    - #### any

          public static <T1,T2,T3,T4,T5> CompositeFuture any(Future<T1> f1,
                                                             Future<T2> f2,
                                                             Future<T3> f3,
                                                             Future<T4> f4,
                                                             Future<T5> f5)

      Like `any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 5 futures.
      Parameters:
        `f1` -
        `f2` -
        `f3` -
        `f4` -
        `f5` -
      Returns:

    - #### any

          public static <T1,T2,T3,T4,T5,T6> CompositeFuture any(Future<T1> f1,
                                                                Future<T2> f2,
                                                                Future<T3> f3,
                                                                Future<T4> f4,
                                                                Future<T5> f5,
                                                                Future<T6> f6)

      Like `any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with 6 futures.
      Parameters:
        `f1` -
        `f2` -
        `f3` -
        `f4` -
        `f5` -
        `f6` -
      Returns:

    - #### any

          public static CompositeFuture any(List<Future> futures)

      Like `any(io.vertx.rxjava.core.Future<T1>, io.vertx.rxjava.core.Future<T2>)` but with a list of futures.

      When the list is empty, the returned future will be already completed.

      Parameters:
        `futures` -
      Returns:

    - #### setHandler

          public CompositeFuture setHandler(Handler<AsyncResult<CompositeFuture>> handler)

      Description copied from class: `Future`
      Set a handler for the result.

      If the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed.

      Overrides:
        `setHandler` in class `Future<CompositeFuture>`
      Parameters:
        `handler` - the Handler that will be called with the result
      Returns:
        a reference to this, so it can be used fluently

    - #### setHandlerObservable

          public Observable<CompositeFuture> setHandlerObservable()

      Description copied from class: `Future`
      Set a handler for the result.

      If the future has already been completed it will be called immediately. Otherwise it will be called when the future is completed.

      Overrides:
        `setHandlerObservable` in class `Future<CompositeFuture>`
      Returns:

    - #### cause

          public Throwable cause(int index)

      Returns a cause of a wrapped future
      Parameters:
        `index` - the wrapped future index
      Returns:

    - #### succeeded

          public boolean succeeded(int index)

      Returns true if a wrapped future is succeeded
      Parameters:
        `index` - the wrapped future index
      Returns:

    - #### failed

          public boolean failed(int index)

      Returns true if a wrapped future is failed
      Parameters:
        `index` - the wrapped future index
      Returns:

    - #### isComplete

          public boolean isComplete(int index)

      Returns true if a wrapped future is completed
      Parameters:
        `index` - the wrapped future index
      Returns:

    - #### result

          public <T> T result(int index)

      Returns the result of a wrapped future
      Parameters:
        `index` - the wrapped future index
      Returns:

    - #### size

          public int size()

      Returns:
        the number of wrapped future

    - #### newInstance

          public static CompositeFuture newInstance(CompositeFuture arg)

Copyright © 2016. All rights reserved.