Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.common.util.concurrent
Interface FutureCallback<V>

    @Beta
    public interface FutureCallback<V>

A callback for accepting the results of a `Future` computation asynchronously.

To attach to a `ListenableFuture` use `Futures.addCallback(com.google.common.util.concurrent.ListenableFuture, com.google.common.util.concurrent.FutureCallback)`.

Since:
  10.0
Author:
  Anthony Zana

Method Summary
`void` | `onFailure(Throwable t)` Invoked when a `Future` computation fails or is canceled.
`void` | `onSuccess(V result)` Invoked with the result of the `Future` computation when it is successful.

Method Detail

### onSuccess

    void onSuccess(V result)

  Invoked with the result of the `Future` computation when it is successful.

### onFailure

    void onFailure(Throwable t)

  Invoked when a `Future` computation fails or is canceled.

  If the future's `get` method throws an `ExecutionException`, then the cause is passed to this method. Any other thrown object is passed unaltered.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010-2011. All Rights Reserved.