Package org.apache.coyote
Enum ErrorState
- java.lang.Object
-
- java.lang.Enum<ErrorState>
-
- org.apache.coyote.ErrorState
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ErrorState>
public enum ErrorState extends java.lang.Enum<ErrorState>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CLOSE_CLEAN
The current request/response is in an error state and while it is safe to complete the current response it is not safe to continue to use the existing connection which must be closed once the response has been completed.CLOSE_CONNECTION_NOW
An error has been detected that impacts the underlying network connection.CLOSE_NOW
The current request/response is in an error state and it is not safe to continue to use them.NONE
Not in an error state.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ErrorState
getMostSevere(ErrorState input)
Compare this ErrorState with the provided ErrorState and return the most severe.boolean
isConnectionIoAllowed()
boolean
isError()
boolean
isIoAllowed()
static ErrorState
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ErrorState[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final ErrorState NONE
Not in an error state.
-
CLOSE_CLEAN
public static final ErrorState CLOSE_CLEAN
The current request/response is in an error state and while it is safe to complete the current response it is not safe to continue to use the existing connection which must be closed once the response has been completed. For multiplexed protocols, the channel must be closed when the current request/response completes but the connection may continue.
-
CLOSE_NOW
public static final ErrorState CLOSE_NOW
The current request/response is in an error state and it is not safe to continue to use them. For multiplexed protocols (such as HTTP/2) the stream/channel must be closed immediately but the connection may continue. For non-multiplexed protocols (AJP, HTTP/1.x) the current connection must be closed.
-
CLOSE_CONNECTION_NOW
public static final ErrorState CLOSE_CONNECTION_NOW
An error has been detected that impacts the underlying network connection. It is not safe to continue using the network connection which must be closed immediately. For multiplexed protocols (such as HTTP/2) this impacts all multiplexed channels.
-
-
Method Detail
-
values
public static ErrorState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ErrorState c : ErrorState.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ErrorState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isError
public boolean isError()
-
getMostSevere
public ErrorState getMostSevere(ErrorState input)
Compare this ErrorState with the provided ErrorState and return the most severe.- Parameters:
input
- The error state to compare to this one- Returns:
- The most severe error state from the the provided error state and this one
-
isIoAllowed
public boolean isIoAllowed()
-
isConnectionIoAllowed
public boolean isConnectionIoAllowed()
-
-