Top Description Fields Constructors Methods
org.apache.hc.core5.http.nio.command

public final Class ShutdownCommand

extends Object
implements Command
Class Inheritance
All Implemented Interfaces
org.apache.hc.core5.reactor.Command, org.apache.hc.core5.concurrent.Cancellable
Imports
org.apache.hc.core5.function.Callback, org.apache.hc.core5.io.CloseMode, org.apache.hc.core5.reactor.Command, .IOSession

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 Summary

Modifier and TypeField and Description
public static final ShutdownCommand
public static final Callback<IOSession>
public static final Callback<IOSession>
public static final ShutdownCommand
private final CloseMode

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
cancel()

Implements org.apache.hc.core5.concurrent.Cancellable.cancel.

Cancels the ongoing operation or process.
private static Callback<IOSession>
public CloseMode
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

GRACEFULback to summary
public static final ShutdownCommand GRACEFUL
GRACEFUL_IMMEDIATE_CALLBACKback to summary
public static final Callback<IOSession> GRACEFUL_IMMEDIATE_CALLBACK
GRACEFUL_NORMAL_CALLBACKback to summary
public static final Callback<IOSession> GRACEFUL_NORMAL_CALLBACK
IMMEDIATEback to summary
public static final ShutdownCommand IMMEDIATE
typeback to summary
private final CloseMode type

Constructor Detail

ShutdownCommandback to summary
public ShutdownCommand(final CloseMode type)

Method Detail

cancelback to summary
public boolean cancel()

Implements org.apache.hc.core5.concurrent.Cancellable.cancel.

Doc from org.apache.hc.core5.concurrent.Cancellable.cancel.

Cancels the ongoing operation or process.

Returns:boolean

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.

Annotations
@Override
createIOSessionCallbackback to summary
private static Callback<IOSession> createIOSessionCallback(final Command.Priority priority)
getTypeback to summary
public CloseMode getType()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override