org.apache.hc.client5.http.impl

## Class Operations.CompletedFuture<T>

- java.lang.Object
- - org.apache.hc.client5.http.impl.Operations.CompletedFuture<T>

- Type Parameters:
    `T` - operation result representation.
  All Implemented Interfaces:
    Future<T>
  Enclosing class:
    Operations

  Deprecated.
  Use `CompletedFuture`.

      @Deprecated
      public static class Operations.CompletedFuture<T>
      extends Object
      implements Future<T>

  This class represents a `Future` in the completed state with a fixed result. The outcome of the future cannot be altered and it cannot be cancelled.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompletedFuture(T result)` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `cancel(boolean mayInterruptIfRunning)` Deprecated.
    `T` | `get()` Deprecated.
    `T` | `get(long timeout, TimeUnit unit)` Deprecated.
    `boolean` | `isCancelled()` Deprecated.
    `boolean` | `isDone()` Deprecated.

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

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

- - ### Constructor Detail

    - #### CompletedFuture

          public CompletedFuture(T result)

      Deprecated.

  - ### Method Detail

    - #### get

          public T get()
                throws InterruptedException,
                       ExecutionException

      Deprecated.
      Specified by:
        `get` in interface `Future<T>`
      Throws:
        `InterruptedException`
        `ExecutionException`

    - #### get

          public T get(long timeout,
                       TimeUnit unit)
                throws InterruptedException,
                       ExecutionException,
                       TimeoutException

      Deprecated.
      Specified by:
        `get` in interface `Future<T>`
      Throws:
        `InterruptedException`
        `ExecutionException`
        `TimeoutException`

    - #### cancel

          public boolean cancel(boolean mayInterruptIfRunning)

      Deprecated.
      Specified by:
        `cancel` in interface `Future<T>`

    - #### isCancelled

          public boolean isCancelled()

      Deprecated.
      Specified by:
        `isCancelled` in interface `Future<T>`

    - #### isDone

          public boolean isDone()

      Deprecated.
      Specified by:
        `isDone` in interface `Future<T>`

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