io.vertx.rxjava.core

## Class Future<T>

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

- Direct Known Subclasses:
    BridgeEvent

      public class Future<T>
      extends Object

  Represents the result of an action that may, or may not, have occurred yet.

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Future(Future delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `complete()` Set a null result.
    `void` | `complete(T result)` Set the result.
    `void` | `fail(String failureMessage)` Set the failure.
    `static <T> Future<T>` | `failedFuture(String failureMessage)` Create a failed future with the specified failure message.
    `static <T> Future<T>` | `future()` Create a future that hasn't completed yet
    `Object` | `getDelegate()`
    `boolean` | `isComplete()` Has the future completed?
    `static <T> Future<T>` | `newInstance(Future arg)`
    `void` | `setHandler(Handler<AsyncResult<T>> handler)` Set a handler for the result.
    `rx.Observable<T>` | `setHandlerObservable()` Set a handler for the result.
    `static <T> Future<T>` | `succeededFuture()` Create a succeeded future with a null result
    `static <T> Future<T>` | `succeededFuture(T result)` Created a succeeded future with the specified result.

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

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

- - ### Constructor Detail

    - #### Future

          public Future(Future delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

    - #### future

          public static <T> Future<T> future()

      Create a future that hasn't completed yet
      Returns:
        the future

    - #### succeededFuture

          public static <T> Future<T> succeededFuture()

      Create a succeeded future with a null result
      Returns:
        the future

    - #### succeededFuture

          public static <T> Future<T> succeededFuture(T result)

      Created a succeeded future with the specified result.
      Parameters:
        `result` - the result
      Returns:
        the future

    - #### failedFuture

          public static <T> Future<T> failedFuture(String failureMessage)

      Create a failed future with the specified failure message.
      Parameters:
        `failureMessage` - the failure message
      Returns:
        the future

    - #### isComplete

          public boolean isComplete()

      Has the future completed?

      It's completed if it's either succeeded or failed.

      Returns:
        true if completed, false if not

    - #### setHandler

          public void setHandler(Handler<AsyncResult<T>> handler)

      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.

      Parameters:
        `handler` - the Handler that will be called with the result

    - #### setHandlerObservable

          public rx.Observable<T> setHandlerObservable()

      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.

      Returns:

    - #### complete

          public void complete(T result)

      Set the result. Any handler will be called, if there is one, and the future will be marked as completed.
      Parameters:
        `result` - the result

    - #### complete

          public void complete()

      Set a null result. Any handler will be called, if there is one, and the future will be marked as completed.

    - #### fail

          public void fail(String failureMessage)

      Set the failure. Any handler will be called, if there is one, and the future will be marked as completed.
      Parameters:
        `failureMessage` - the failure message

    - #### newInstance

          public static <T> Future<T> newInstance(Future arg)

Copyright © 2015. All rights reserved.