Package software.amazon.awssdk.http
Enum HttpStatusFamily
- All Implemented Interfaces:
Serializable
,Comparable<HttpStatusFamily>
The set of HTTP status families defined by the standard. A code can be converted to its family with
of(int)
.-
Enum Constant Summary
Enum ConstantDescription4xx response family.1xx response family.The family for any status code outside of the range 100-599.3xx response family.5xx response family.2xx response family. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isOneOf
(HttpStatusFamily... families) Determine whether this HTTP status family is in the list of provided families.static HttpStatusFamily
of
(int httpStatusCode) Retrieve the HTTP status family for the given HTTP status code.static HttpStatusFamily
Returns the enum constant of this type with the specified name.static HttpStatusFamily[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INFORMATIONAL
1xx response family. -
SUCCESSFUL
2xx response family. -
REDIRECTION
3xx response family. -
CLIENT_ERROR
4xx response family. -
SERVER_ERROR
5xx response family. -
OTHER
The family for any status code outside of the range 100-599.
-
-
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
-
of
Retrieve the HTTP status family for the given HTTP status code. -
isOneOf
Determine whether this HTTP status family is in the list of provided families.- Parameters:
families
- The list of families to check against this family.- Returns:
- True if any of the families in the list match this one.
-