Package org.apache.hc.core5.http.message
Enum StatusLine.StatusClass
- All Implemented Interfaces:
Serializable
,Comparable<StatusLine.StatusClass>
- Enclosing class:
StatusLine
Standard classes of HTTP status codes, plus
OTHER
for non-standard codes.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionClient Error4xx
HTTP status codes.Informational1xx
HTTP status codes.Any other HTTP status codes (e.g.Redirection3xx
HTTP status codes.5xx
HTTP status codes.Successful2xx
HTTP status codes. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StatusLine.StatusClass
from
(int statusCode) Gets the response status class for the given status code.static StatusLine.StatusClass
Returns the enum constant of this type with the specified name.static StatusLine.StatusClass[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INFORMATIONAL
Informational1xx
HTTP status codes. -
SUCCESSFUL
Successful2xx
HTTP status codes. -
REDIRECTION
Redirection3xx
HTTP status codes. -
CLIENT_ERROR
Client Error4xx
HTTP status codes. -
SERVER_ERROR
5xx
HTTP status codes. -
OTHER
Any other HTTP status codes (e.g. non-standard status codes).
-
-
Constructor Details
-
StatusClass
private StatusClass()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
from
Gets the response status class for the given status code.- Parameters:
statusCode
- response status code to get the class for.- Returns:
- class of the response status code.
-