Package org.eclipse.jetty.http
Enum HttpStatus.Code
- java.lang.Object
-
- java.lang.Enum<HttpStatus.Code>
-
- org.eclipse.jetty.http.HttpStatus.Code
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<HttpStatus.Code>
- Enclosing class:
- HttpStatus
public static enum HttpStatus.Code extends java.lang.Enum<HttpStatus.Code>
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(int code)
int
getCode()
java.lang.String
getMessage()
boolean
isClientError()
Simple test against an code to determine if it falls into theClient Error
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.boolean
isInformational()
Simple test against an code to determine if it falls into theInformational
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.boolean
isRedirection()
Simple test against an code to determine if it falls into theRedirection
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.boolean
isServerError()
Simple test against an code to determine if it falls into theServer Error
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.boolean
isSuccess()
Simple test against an code to determine if it falls into theSuccess
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.java.lang.String
toString()
static HttpStatus.Code
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static HttpStatus.Code[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CONTINUE
public static final HttpStatus.Code CONTINUE
-
SWITCHING_PROTOCOLS
public static final HttpStatus.Code SWITCHING_PROTOCOLS
-
PROCESSING
public static final HttpStatus.Code PROCESSING
-
OK
public static final HttpStatus.Code OK
-
CREATED
public static final HttpStatus.Code CREATED
-
ACCEPTED
public static final HttpStatus.Code ACCEPTED
-
NON_AUTHORITATIVE_INFORMATION
public static final HttpStatus.Code NON_AUTHORITATIVE_INFORMATION
-
NO_CONTENT
public static final HttpStatus.Code NO_CONTENT
-
RESET_CONTENT
public static final HttpStatus.Code RESET_CONTENT
-
PARTIAL_CONTENT
public static final HttpStatus.Code PARTIAL_CONTENT
-
MULTI_STATUS
public static final HttpStatus.Code MULTI_STATUS
-
MULTIPLE_CHOICES
public static final HttpStatus.Code MULTIPLE_CHOICES
-
MOVED_PERMANENTLY
public static final HttpStatus.Code MOVED_PERMANENTLY
-
MOVED_TEMPORARILY
public static final HttpStatus.Code MOVED_TEMPORARILY
-
FOUND
public static final HttpStatus.Code FOUND
-
SEE_OTHER
public static final HttpStatus.Code SEE_OTHER
-
NOT_MODIFIED
public static final HttpStatus.Code NOT_MODIFIED
-
USE_PROXY
public static final HttpStatus.Code USE_PROXY
-
TEMPORARY_REDIRECT
public static final HttpStatus.Code TEMPORARY_REDIRECT
-
PERMANET_REDIRECT
public static final HttpStatus.Code PERMANET_REDIRECT
-
PERMANENT_REDIRECT
public static final HttpStatus.Code PERMANENT_REDIRECT
-
BAD_REQUEST
public static final HttpStatus.Code BAD_REQUEST
-
UNAUTHORIZED
public static final HttpStatus.Code UNAUTHORIZED
-
PAYMENT_REQUIRED
public static final HttpStatus.Code PAYMENT_REQUIRED
-
FORBIDDEN
public static final HttpStatus.Code FORBIDDEN
-
NOT_FOUND
public static final HttpStatus.Code NOT_FOUND
-
METHOD_NOT_ALLOWED
public static final HttpStatus.Code METHOD_NOT_ALLOWED
-
NOT_ACCEPTABLE
public static final HttpStatus.Code NOT_ACCEPTABLE
-
PROXY_AUTHENTICATION_REQUIRED
public static final HttpStatus.Code PROXY_AUTHENTICATION_REQUIRED
-
REQUEST_TIMEOUT
public static final HttpStatus.Code REQUEST_TIMEOUT
-
CONFLICT
public static final HttpStatus.Code CONFLICT
-
GONE
public static final HttpStatus.Code GONE
-
LENGTH_REQUIRED
public static final HttpStatus.Code LENGTH_REQUIRED
-
PRECONDITION_FAILED
public static final HttpStatus.Code PRECONDITION_FAILED
-
PAYLOAD_TOO_LARGE
public static final HttpStatus.Code PAYLOAD_TOO_LARGE
-
URI_TOO_LONG
public static final HttpStatus.Code URI_TOO_LONG
-
UNSUPPORTED_MEDIA_TYPE
public static final HttpStatus.Code UNSUPPORTED_MEDIA_TYPE
-
RANGE_NOT_SATISFIABLE
public static final HttpStatus.Code RANGE_NOT_SATISFIABLE
-
EXPECTATION_FAILED
public static final HttpStatus.Code EXPECTATION_FAILED
-
IM_A_TEAPOT
public static final HttpStatus.Code IM_A_TEAPOT
-
ENHANCE_YOUR_CALM
public static final HttpStatus.Code ENHANCE_YOUR_CALM
-
MISDIRECTED_REQUEST
public static final HttpStatus.Code MISDIRECTED_REQUEST
-
UNPROCESSABLE_ENTITY
public static final HttpStatus.Code UNPROCESSABLE_ENTITY
-
LOCKED
public static final HttpStatus.Code LOCKED
-
FAILED_DEPENDENCY
public static final HttpStatus.Code FAILED_DEPENDENCY
-
UPGRADE_REQUIRED
public static final HttpStatus.Code UPGRADE_REQUIRED
-
PRECONDITION_REQUIRED
public static final HttpStatus.Code PRECONDITION_REQUIRED
-
TOO_MANY_REQUESTS
public static final HttpStatus.Code TOO_MANY_REQUESTS
-
REQUEST_HEADER_FIELDS_TOO_LARGE
public static final HttpStatus.Code REQUEST_HEADER_FIELDS_TOO_LARGE
-
UNAVAILABLE_FOR_LEGAL_REASONS
public static final HttpStatus.Code UNAVAILABLE_FOR_LEGAL_REASONS
-
INTERNAL_SERVER_ERROR
public static final HttpStatus.Code INTERNAL_SERVER_ERROR
-
NOT_IMPLEMENTED
public static final HttpStatus.Code NOT_IMPLEMENTED
-
BAD_GATEWAY
public static final HttpStatus.Code BAD_GATEWAY
-
SERVICE_UNAVAILABLE
public static final HttpStatus.Code SERVICE_UNAVAILABLE
-
GATEWAY_TIMEOUT
public static final HttpStatus.Code GATEWAY_TIMEOUT
-
HTTP_VERSION_NOT_SUPPORTED
public static final HttpStatus.Code HTTP_VERSION_NOT_SUPPORTED
-
INSUFFICIENT_STORAGE
public static final HttpStatus.Code INSUFFICIENT_STORAGE
-
LOOP_DETECTED
public static final HttpStatus.Code LOOP_DETECTED
-
NOT_EXTENDED
public static final HttpStatus.Code NOT_EXTENDED
-
NETWORK_AUTHENTICATION_REQUIRED
public static final HttpStatus.Code NETWORK_AUTHENTICATION_REQUIRED
-
-
Method Detail
-
values
public static HttpStatus.Code[] 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 (HttpStatus.Code c : HttpStatus.Code.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HttpStatus.Code 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
-
getCode
public int getCode()
-
getMessage
public java.lang.String getMessage()
-
equals
public boolean equals(int code)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<HttpStatus.Code>
-
isInformational
public boolean isInformational()
Simple test against an code to determine if it falls into theInformational
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.- Returns:
- true if within range of codes that belongs to
Informational
messages.
-
isSuccess
public boolean isSuccess()
Simple test against an code to determine if it falls into theSuccess
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.- Returns:
- true if within range of codes that belongs to
Success
messages.
-
isRedirection
public boolean isRedirection()
Simple test against an code to determine if it falls into theRedirection
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.- Returns:
- true if within range of codes that belongs to
Redirection
messages.
-
isClientError
public boolean isClientError()
Simple test against an code to determine if it falls into theClient Error
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.- Returns:
- true if within range of codes that belongs to
Client Error
messages.
-
isServerError
public boolean isServerError()
Simple test against an code to determine if it falls into theServer Error
message category as defined in the RFC 1945 - HTTP/1.0, and RFC 7231 - HTTP/1.1.- Returns:
- true if within range of codes that belongs to
Server Error
messages.
-
-