org.apache.hc.core5.concurrent

## Class CallbackContribution<T>

- java.lang.Object
- - org.apache.hc.core5.concurrent.CallbackContribution<T>

- Type Parameters:
    `T` - the future result type of an asynchronous operation.
  All Implemented Interfaces:
    FutureCallback<T>

      public abstract class CallbackContribution<T>
      extends Object
      implements FutureCallback<T>

  Abstracts implementations of `FutureCallback`s that contribute a result of the operation to another `FutureCallback`.
  Since:
    5.1

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CallbackContribution(FutureCallback<?> callback)` Constructs a new instance for a FutureCallback.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancelled()`
    `void` | `failed(Exception ex)`

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

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

    - ### Methods inherited from interface org.apache.hc.core5.concurrent.FutureCallback

      `completed`

- - ### Constructor Detail

    - #### CallbackContribution

          public CallbackContribution(FutureCallback<?> callback)

      Constructs a new instance for a FutureCallback.
      Parameters:
        `callback` - the FutureCallback, may be `null`.

  - ### Method Detail

    - #### failed

          public final void failed(Exception ex)

      Specified by:
        `failed` in interface `FutureCallback<T>`

    - #### cancelled

          public final void cancelled()

      Specified by:
        `cancelled` in interface `FutureCallback<T>`

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.