org.apache.awf.web.http.protocol
Enum HttpStatus

java.lang.Object
  extended by java.lang.Enum<HttpStatus>
      extended by org.apache.awf.web.http.protocol.HttpStatus
All Implemented Interfaces:
Serializable, Comparable<HttpStatus>

public enum HttpStatus
extends Enum<HttpStatus>

An Enumeration of all known HTTP status codes.


Enum Constant Summary
CLIENT_ERROR_BAD_REQUEST
          400 - Bad Request
CLIENT_ERROR_CONFLICT
          409 - Conflict
CLIENT_ERROR_EXPECTATION_FAILED
          417 - Expectation Failed
CLIENT_ERROR_FORBIDDEN
          403 - Forbidden
CLIENT_ERROR_GONE
          410 - Gone
CLIENT_ERROR_LENGTH_REQUIRED
          411 - Length Required
CLIENT_ERROR_METHOD_NOT_ALLOWED
          405 - Method Not Allowed
CLIENT_ERROR_NOT_ACCEPTABLE
          406 - Not Acceptable
CLIENT_ERROR_NOT_FOUND
          404 - Not Found
CLIENT_ERROR_PRECONDITION_FAILED
          412 - Precondition Failed
CLIENT_ERROR_PROXY_AUTHENTICATION_REQUIRED
          407 - Proxy Authentication Required
CLIENT_ERROR_REQUEST_ENTITY_TOO_LARGE
          413 - Request Entity Too Large
CLIENT_ERROR_REQUEST_TIMEOUT
          408 - Request Timeout
CLIENT_ERROR_REQUEST_URI_TOO_LONG
          414 - Bad Request
CLIENT_ERROR_REQUESTED_RANGE_NOT_SATISFIABLE
          416 - Requested Range Not Satisfiable
CLIENT_ERROR_UNAUTHORIZED
          401 - Unauthorized
CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE
          415 - Unsupported Media Type
REDIRECTION_FOUND
          302 - Found / Moved Temporarily
REDIRECTION_MOVED_PERMANENTLY
          301 - Moved Permanently
REDIRECTION_MULTIPLE_CHOICES
          300 - Multiple Choices
REDIRECTION_NOT_MODIFIED
          304 - Not Modified
REDIRECTION_SEE_OTHER
          303 - See Others
REDIRECTION_TEMPORARILY_REDIRECT
          307 - Temporary Redirect
REDIRECTION_USE_PROXY
          305 - Use Proxy
SERVER_ERROR_BAD_GATEWAY
          502 - Bad Gateway
SERVER_ERROR_GATEWAY_TIMEOUT
          504 - Gateway Timeout
SERVER_ERROR_HTTP_VERSION_NOT_SUPPORTED
          505 - HTTP Version Not Supported
SERVER_ERROR_INTERNAL_SERVER_ERROR
          500 - Internal Server Error
SERVER_ERROR_NOT_IMPLEMENTED
          501 - Not Implemented
SERVER_ERROR_SERVICE_UNAVAILABLE
          503 - Service Unavailable
SUCCESS_ACCEPTED
          202 - Accepted
SUCCESS_CONTINUE
          100 - CONTINUE
SUCCESS_CREATED
          201 - Created
SUCCESS_NO_CONTENT
          204 - No Content
SUCCESS_NON_AUTHORATIVE_INFORMATION
          203 - Non-Authoritative Information
SUCCESS_OK
          200 - OK
SUCCESS_PARTIAL_CONTENT
          206 - Created
SUCCESS_RESET_CONTENT
          205 - Reset Content
 
Method Summary
 int code()
          Retrieve the status code for this instance.
 String line()
          Retrieve the status line for this instance.
static HttpStatus valueOf(String name)
          Returns the enum constant of this type with the specified name.
static HttpStatus[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SUCCESS_CONTINUE

public static final HttpStatus SUCCESS_CONTINUE
100 - CONTINUE


SUCCESS_OK

public static final HttpStatus SUCCESS_OK
200 - OK


SUCCESS_CREATED

public static final HttpStatus SUCCESS_CREATED
201 - Created


SUCCESS_ACCEPTED

public static final HttpStatus SUCCESS_ACCEPTED
202 - Accepted


SUCCESS_NON_AUTHORATIVE_INFORMATION

public static final HttpStatus SUCCESS_NON_AUTHORATIVE_INFORMATION
203 - Non-Authoritative Information


SUCCESS_NO_CONTENT

public static final HttpStatus SUCCESS_NO_CONTENT
204 - No Content


SUCCESS_RESET_CONTENT

public static final HttpStatus SUCCESS_RESET_CONTENT
205 - Reset Content


SUCCESS_PARTIAL_CONTENT

public static final HttpStatus SUCCESS_PARTIAL_CONTENT
206 - Created


REDIRECTION_MULTIPLE_CHOICES

public static final HttpStatus REDIRECTION_MULTIPLE_CHOICES
300 - Multiple Choices


REDIRECTION_MOVED_PERMANENTLY

public static final HttpStatus REDIRECTION_MOVED_PERMANENTLY
301 - Moved Permanently


REDIRECTION_FOUND

public static final HttpStatus REDIRECTION_FOUND
302 - Found / Moved Temporarily


REDIRECTION_SEE_OTHER

public static final HttpStatus REDIRECTION_SEE_OTHER
303 - See Others


REDIRECTION_NOT_MODIFIED

public static final HttpStatus REDIRECTION_NOT_MODIFIED
304 - Not Modified


REDIRECTION_USE_PROXY

public static final HttpStatus REDIRECTION_USE_PROXY
305 - Use Proxy


REDIRECTION_TEMPORARILY_REDIRECT

public static final HttpStatus REDIRECTION_TEMPORARILY_REDIRECT
307 - Temporary Redirect


CLIENT_ERROR_BAD_REQUEST

public static final HttpStatus CLIENT_ERROR_BAD_REQUEST
400 - Bad Request


CLIENT_ERROR_UNAUTHORIZED

public static final HttpStatus CLIENT_ERROR_UNAUTHORIZED
401 - Unauthorized


CLIENT_ERROR_FORBIDDEN

public static final HttpStatus CLIENT_ERROR_FORBIDDEN
403 - Forbidden


CLIENT_ERROR_NOT_FOUND

public static final HttpStatus CLIENT_ERROR_NOT_FOUND
404 - Not Found


CLIENT_ERROR_METHOD_NOT_ALLOWED

public static final HttpStatus CLIENT_ERROR_METHOD_NOT_ALLOWED
405 - Method Not Allowed


CLIENT_ERROR_NOT_ACCEPTABLE

public static final HttpStatus CLIENT_ERROR_NOT_ACCEPTABLE
406 - Not Acceptable


CLIENT_ERROR_PROXY_AUTHENTICATION_REQUIRED

public static final HttpStatus CLIENT_ERROR_PROXY_AUTHENTICATION_REQUIRED
407 - Proxy Authentication Required


CLIENT_ERROR_REQUEST_TIMEOUT

public static final HttpStatus CLIENT_ERROR_REQUEST_TIMEOUT
408 - Request Timeout


CLIENT_ERROR_CONFLICT

public static final HttpStatus CLIENT_ERROR_CONFLICT
409 - Conflict


CLIENT_ERROR_GONE

public static final HttpStatus CLIENT_ERROR_GONE
410 - Gone


CLIENT_ERROR_LENGTH_REQUIRED

public static final HttpStatus CLIENT_ERROR_LENGTH_REQUIRED
411 - Length Required


CLIENT_ERROR_PRECONDITION_FAILED

public static final HttpStatus CLIENT_ERROR_PRECONDITION_FAILED
412 - Precondition Failed


CLIENT_ERROR_REQUEST_ENTITY_TOO_LARGE

public static final HttpStatus CLIENT_ERROR_REQUEST_ENTITY_TOO_LARGE
413 - Request Entity Too Large


CLIENT_ERROR_REQUEST_URI_TOO_LONG

public static final HttpStatus CLIENT_ERROR_REQUEST_URI_TOO_LONG
414 - Bad Request


CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE

public static final HttpStatus CLIENT_ERROR_UNSUPPORTED_MEDIA_TYPE
415 - Unsupported Media Type


CLIENT_ERROR_REQUESTED_RANGE_NOT_SATISFIABLE

public static final HttpStatus CLIENT_ERROR_REQUESTED_RANGE_NOT_SATISFIABLE
416 - Requested Range Not Satisfiable


CLIENT_ERROR_EXPECTATION_FAILED

public static final HttpStatus CLIENT_ERROR_EXPECTATION_FAILED
417 - Expectation Failed


SERVER_ERROR_INTERNAL_SERVER_ERROR

public static final HttpStatus SERVER_ERROR_INTERNAL_SERVER_ERROR
500 - Internal Server Error


SERVER_ERROR_NOT_IMPLEMENTED

public static final HttpStatus SERVER_ERROR_NOT_IMPLEMENTED
501 - Not Implemented


SERVER_ERROR_BAD_GATEWAY

public static final HttpStatus SERVER_ERROR_BAD_GATEWAY
502 - Bad Gateway


SERVER_ERROR_SERVICE_UNAVAILABLE

public static final HttpStatus SERVER_ERROR_SERVICE_UNAVAILABLE
503 - Service Unavailable


SERVER_ERROR_GATEWAY_TIMEOUT

public static final HttpStatus SERVER_ERROR_GATEWAY_TIMEOUT
504 - Gateway Timeout


SERVER_ERROR_HTTP_VERSION_NOT_SUPPORTED

public static final HttpStatus SERVER_ERROR_HTTP_VERSION_NOT_SUPPORTED
505 - HTTP Version Not Supported

Method Detail

values

public static HttpStatus[] 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 c : HttpStatus.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 valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

code

public int code()
Retrieve the status code for this instance.

Returns:
the status code.

line

public String line()
Retrieve the status line for this instance.

Returns:
the status line.


Copyright © 2012. All Rights Reserved.