Class ShutdownCommand
- java.lang.Object
-
- org.apache.hc.core5.http.nio.command.ShutdownCommand
-
- All Implemented Interfaces:
Cancellable,Command
public final class ShutdownCommand extends java.lang.Object implements Command
Shutdown command. Two shutdown modes are supported:CloseMode.GRACEFULandCloseMode.IMMEDIATE. The exact implementation of both modes is protocol or handler specific.- Since:
- 5.0
-
-
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 static ShutdownCommandGRACEFULstatic Callback<IOSession>GRACEFUL_IMMEDIATE_CALLBACKstatic Callback<IOSession>GRACEFUL_NORMAL_CALLBACKstatic ShutdownCommandIMMEDIATE
-
Constructor Summary
Constructors Constructor Description ShutdownCommand(CloseMode type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel()Cancels the ongoing operation or process.CloseModegetType()java.lang.StringtoString()
-
-
-
Field Detail
-
GRACEFUL
public static final ShutdownCommand GRACEFUL
-
IMMEDIATE
public static final ShutdownCommand IMMEDIATE
-
-
Constructor Detail
-
ShutdownCommand
public ShutdownCommand(CloseMode type)
-
-
Method Detail
-
getType
public CloseMode getType()
-
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.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-