io.vertx.core

## Interface AsyncResult<T>

- All Known Subinterfaces:
    BridgeEvent, Future<T>

      public interface AsyncResult<T>

  Encapsulates the result of an asynchronous operation.

  Many operations in Vert.x APIs provide results back by passing an instance of this in a `Handler`.

  The result can either have failed or succeeded.

  If it failed then the cause of the failure is available with `cause()`.

  If it succeeded then the actual result is available with `result()`

  Author:
    Tim Fox

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Throwable` | `cause()` A Throwable describing failure.
    `boolean` | `failed()` Did it fail?
    `T` | `result()` The result of the operation.
    `boolean` | `succeeded()` Did it succeed?

- - ### Method Detail

    - #### result

          T result()

      The result of the operation. This will be null if the operation failed.
      Returns:
        the result or null if the operation failed.

    - #### cause

          Throwable cause()

      A Throwable describing failure. This will be null if the operation succeeded.
      Returns:
        the cause or null if the operation succeeded.

    - #### succeeded

          boolean succeeded()

      Did it succeed?
      Returns:
        true if it succeded or false otherwise

    - #### failed

          boolean failed()

      Did it fail?
      Returns:
        true if it failed or false otherwise

Copyright © 2015. All Rights Reserved.