Class StaleCheckCommand
- java.lang.Object
-
- org.apache.hc.core5.http.nio.command.StaleCheckCommand
-
- All Implemented Interfaces:
Cancellable,Command
@Internal public final class StaleCheckCommand extends java.lang.Object implements Command
Stale check command. Thecallbackwill be invoked after the client's event loop has finished processing all pending reads on the connection. If the connection is still active at that point, the callback will be completed withtrue. In any other event, the callback will be cancelled, failed, or completed withfalse.- Since:
- 5.4
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.hc.core5.reactor.Command
Command.Priority
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.function.Consumer<java.lang.Boolean>callback
-
Constructor Summary
Constructors Constructor Description StaleCheckCommand(java.util.function.Consumer<java.lang.Boolean> callback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel()Cancels the ongoing operation or process.java.util.function.Consumer<java.lang.Boolean>getCallback()
-
-
-
Method Detail
-
getCallback
public java.util.function.Consumer<java.lang.Boolean> getCallback()
-
cancel
public boolean cancel()
Description copied from interface:CancellableCancels the ongoing operation or process.- Specified by:
cancelin interfaceCancellable- Returns:
trueif the operation or process has been cancelled as a result of this method call orfalseif it has already been cancelled or not started.
-
-