org.apache.hc.core5.http.nio.command

## 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

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.hc.core5.reactor.Command

      `Command.Priority`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ShutdownCommand` | `GRACEFUL`
    `static Callback<IOSession>` | `GRACEFUL_IMMEDIATE_CALLBACK`
    `static Callback<IOSession>` | `GRACEFUL_NORMAL_CALLBACK`
    `static ShutdownCommand` | `IMMEDIATE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ShutdownCommand(CloseMode type)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `cancel()` Cancels the ongoing operation or process.
    `CloseMode` | `getType()`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### GRACEFUL

          public static final ShutdownCommand GRACEFUL

    - #### IMMEDIATE

          public static final ShutdownCommand IMMEDIATE

    - #### GRACEFUL_IMMEDIATE_CALLBACK

          public static final Callback<IOSession> GRACEFUL_IMMEDIATE_CALLBACK

    - #### GRACEFUL_NORMAL_CALLBACK

          public static final Callback<IOSession> GRACEFUL_NORMAL_CALLBACK

  - ### Constructor Detail

    - #### ShutdownCommand

          public ShutdownCommand(CloseMode type)

  - ### Method Detail

    - #### 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`

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.