Class ShutdownCommand

java.lang.Object
org.apache.hc.core5.http.nio.command.ShutdownCommand
All Implemented Interfaces:
Cancellable, Command

public final class ShutdownCommand extends Object implements Command
Shutdown command. Two shutdown modes are supported: CloseMode.GRACEFUL and CloseMode.IMMEDIATE. The exact implementation of both modes is protocol or handler specific.
Since:
5.0
  • Field Details

  • Constructor Details

    • ShutdownCommand

      public ShutdownCommand(CloseMode type)
  • Method Details

    • createIOSessionCallback

      private static Callback<IOSession> createIOSessionCallback(Command.Priority priority)
    • getType

      public CloseMode getType()
    • cancel

      public boolean cancel()
      Description copied from interface: Cancellable
      Cancels the ongoing operation or process.
      Specified by:
      cancel in interface Cancellable
      Returns:
      true if the operation or process has been cancelled as a result of this method call or false if it has already been cancelled or not started.
    • toString

      public String toString()
      Overrides:
      toString in class Object