org.apache.hc.client5.http.impl

## Class Operations

- java.lang.Object
- - org.apache.hc.client5.http.impl.Operations

-     public final class Operations
      extends Object

  Common cancellable operations.
  Since:
    5.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Operations.CompletedFuture<T>` Deprecated. Use `CompletedFuture`.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Operations()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static org.apache.hc.core5.concurrent.Cancellable` | `cancellable(Future<?> future)` Creates a `Cancellable` operation handle for an ongoing process or operation represented by a `Future`.
    `static org.apache.hc.core5.concurrent.Cancellable` | `nonCancellable()` Creates a `Cancellable` operation handle for an ongoing process or operation that cannot be cancelled.

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

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

- - ### Constructor Detail

    - #### Operations

          public Operations()

  - ### Method Detail

    - #### nonCancellable

          public static org.apache.hc.core5.concurrent.Cancellable nonCancellable()

      Creates a `Cancellable` operation handle for an ongoing process or operation that cannot be cancelled. Attempts to cancel the operation with this handle will have no effect.
      Returns:
        the no-op cancellable operation handle.

    - #### cancellable

          public static org.apache.hc.core5.concurrent.Cancellable cancellable(Future<?> future)

      Creates a `Cancellable` operation handle for an ongoing process or operation represented by a `Future`.
      Parameters:
        `future` - the result future
      Returns:
        the cancellable operation handle.

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