Package org.apache.hc.client5.http.impl
Class Operations
java.lang.Object
org.apache.hc.client5.http.impl.Operations
Common cancellable operations.
- Since:
- 5.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This class represents aFuture
in the completed state with a fixed result. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.hc.core5.concurrent.Cancellable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.hc.core5.concurrent.Cancellable
cancellable
(Future<?> future) Creates aCancellable
operation handle for an ongoing process or operation represented by aFuture
.static org.apache.hc.core5.concurrent.Cancellable
Creates aCancellable
operation handle for an ongoing process or operation that cannot be cancelled.
-
Field Details
-
NOOP_CANCELLABLE
private static final org.apache.hc.core5.concurrent.Cancellable NOOP_CANCELLABLE
-
-
Constructor Details
-
Operations
public Operations()
-
-
Method Details
-
nonCancellable
public static org.apache.hc.core5.concurrent.Cancellable nonCancellable()Creates aCancellable
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
Creates aCancellable
operation handle for an ongoing process or operation represented by aFuture
.- Parameters:
future
- the result future- Returns:
- the cancellable operation handle.
-