Enum Class RedirectType
- All Implemented Interfaces:
Serializable, Comparable<RedirectType>, Constable
Typesafe representation of HTTP Redirect types (
301, 302, 303, 307, 308
).
Detailed documentation is available at https://www.soklet.com/docs/response-writing#redirects.
- Author:
- Mark Allen
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents301 Moved Permanently
.Represents302 Found
.Represents303 See Other
.Represents307 Temporary Redirect
.Represents308 Permanent Redirect
. -
Method Summary
Modifier and TypeMethodDescriptionThe HTTP status code for this redirect type.static RedirectType
Returns the enum constant of this class with the specified name.static RedirectType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
HTTP_301_MOVED_PERMANENTLY
Represents301 Moved Permanently
. -
HTTP_302_FOUND
Represents302 Found
. -
HTTP_303_SEE_OTHER
Represents303 See Other
. -
HTTP_307_TEMPORARY_REDIRECT
Represents307 Temporary Redirect
. -
HTTP_308_PERMANENT_REDIRECT
Represents308 Permanent Redirect
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
getStatusCode
The HTTP status code for this redirect type.- Returns:
- the status code
-