org.glassfish.grizzly.http.util
Enum HttpStatus

java.lang.Object
  extended by java.lang.Enum<HttpStatus>
      extended by org.glassfish.grizzly.http.util.HttpStatus
All Implemented Interfaces:
Serializable, Comparable<HttpStatus>

public enum HttpStatus
extends Enum<HttpStatus>

This enum encapsulates the HTTP response status and reason phrases as defined by RFC 2616.

Since:
2.0

Enum Constant Summary
ACCEPTED_202
           
BAD_GATEWAY_502
           
BAD_REQUEST_400
           
CONFLICT_409
           
CONINTUE_100
           
CREATED_201
           
EXPECTATION_FAILED_417
           
FORBIDDEN_403
           
FOUND_302
           
GATEWAY_TIMEOUT_504
           
GONE_410
           
HTTP_VERSION_NOT_SUPPORTED_505
           
INTERNAL_SERVER_ERROR_500
           
LENGTH_REQUIRED_411
           
METHOD_NOT_ALLOWED_405
           
MOVED_PERMANENTLY_301
           
MULTIPLE_CHOICES_300
           
NO_CONTENT_204
           
NON_AUTHORATIVE_INFORMATION_203
           
NOT_ACCEPTABLE_406
           
NOT_FOUND_404
           
NOT_IMPLEMENTED_501
           
NOT_MODIFIED_304
           
OK_200
           
PARTIAL_CONTENT_206
           
PAYMENT_REQUIRED_402
           
PRECONDITION_FAILED_412
           
PROXY_AUTHENTICATION_REQUIRED_407
           
REQUEST_ENTITY_TOO_LARGE_413
           
REQUEST_RANGE_NOT_SATISFIABLE_416
           
REQUEST_TIMEOUT_408
           
REQUEST_URI_TOO_LONG_414
           
RESET_CONTENT_205
           
SEE_OTHER_303
           
SERVICE_UNAVAILABLE_503
           
SWITCHING_PROTOCOLS_101
           
TEMPORARY_REDIRECT_307
           
UNAUTHORIZED_401
           
UNSUPPORTED_MEDIA_TYPE_415
           
USE_PROXY_305
           
WEB_SOCKET_PROTOCOL_HANDSHAKE_101
           
 
Method Summary
 BufferChunk getReasonPhraseBC()
           
 int getStatusCode()
           
 void setValues(HttpResponsePacket response)
          Sets the status and reason phrase on the specified response.
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

CONINTUE_100

public static final HttpStatus CONINTUE_100

SWITCHING_PROTOCOLS_101

public static final HttpStatus SWITCHING_PROTOCOLS_101

WEB_SOCKET_PROTOCOL_HANDSHAKE_101

public static final HttpStatus WEB_SOCKET_PROTOCOL_HANDSHAKE_101

OK_200

public static final HttpStatus OK_200

CREATED_201

public static final HttpStatus CREATED_201

ACCEPTED_202

public static final HttpStatus ACCEPTED_202

NON_AUTHORATIVE_INFORMATION_203

public static final HttpStatus NON_AUTHORATIVE_INFORMATION_203

NO_CONTENT_204

public static final HttpStatus NO_CONTENT_204

RESET_CONTENT_205

public static final HttpStatus RESET_CONTENT_205

PARTIAL_CONTENT_206

public static final HttpStatus PARTIAL_CONTENT_206

MULTIPLE_CHOICES_300

public static final HttpStatus MULTIPLE_CHOICES_300

MOVED_PERMANENTLY_301

public static final HttpStatus MOVED_PERMANENTLY_301

FOUND_302

public static final HttpStatus FOUND_302

SEE_OTHER_303

public static final HttpStatus SEE_OTHER_303

NOT_MODIFIED_304

public static final HttpStatus NOT_MODIFIED_304

USE_PROXY_305

public static final HttpStatus USE_PROXY_305

TEMPORARY_REDIRECT_307

public static final HttpStatus TEMPORARY_REDIRECT_307

BAD_REQUEST_400

public static final HttpStatus BAD_REQUEST_400

UNAUTHORIZED_401

public static final HttpStatus UNAUTHORIZED_401

PAYMENT_REQUIRED_402

public static final HttpStatus PAYMENT_REQUIRED_402

FORBIDDEN_403

public static final HttpStatus FORBIDDEN_403

NOT_FOUND_404

public static final HttpStatus NOT_FOUND_404

METHOD_NOT_ALLOWED_405

public static final HttpStatus METHOD_NOT_ALLOWED_405

NOT_ACCEPTABLE_406

public static final HttpStatus NOT_ACCEPTABLE_406

PROXY_AUTHENTICATION_REQUIRED_407

public static final HttpStatus PROXY_AUTHENTICATION_REQUIRED_407

REQUEST_TIMEOUT_408

public static final HttpStatus REQUEST_TIMEOUT_408

CONFLICT_409

public static final HttpStatus CONFLICT_409

GONE_410

public static final HttpStatus GONE_410

LENGTH_REQUIRED_411

public static final HttpStatus LENGTH_REQUIRED_411

PRECONDITION_FAILED_412

public static final HttpStatus PRECONDITION_FAILED_412

REQUEST_ENTITY_TOO_LARGE_413

public static final HttpStatus REQUEST_ENTITY_TOO_LARGE_413

REQUEST_URI_TOO_LONG_414

public static final HttpStatus REQUEST_URI_TOO_LONG_414

UNSUPPORTED_MEDIA_TYPE_415

public static final HttpStatus UNSUPPORTED_MEDIA_TYPE_415

REQUEST_RANGE_NOT_SATISFIABLE_416

public static final HttpStatus REQUEST_RANGE_NOT_SATISFIABLE_416

EXPECTATION_FAILED_417

public static final HttpStatus EXPECTATION_FAILED_417

INTERNAL_SERVER_ERROR_500

public static final HttpStatus INTERNAL_SERVER_ERROR_500

NOT_IMPLEMENTED_501

public static final HttpStatus NOT_IMPLEMENTED_501

BAD_GATEWAY_502

public static final HttpStatus BAD_GATEWAY_502

SERVICE_UNAVAILABLE_503

public static final HttpStatus SERVICE_UNAVAILABLE_503

GATEWAY_TIMEOUT_504

public static final HttpStatus GATEWAY_TIMEOUT_504

HTTP_VERSION_NOT_SUPPORTED_505

public static final HttpStatus HTTP_VERSION_NOT_SUPPORTED_505
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

getStatusCode

public int getStatusCode()
Returns:
the int status code.

getReasonPhraseBC

public BufferChunk getReasonPhraseBC()
Returns:
the BufferChunk containing the reason phrase as defined by RFC 2616.

setValues

public void setValues(HttpResponsePacket response)
Sets the status and reason phrase on the specified response.

Parameters:
response - the response to set the status and reason phrase on.


Copyright © 2010 Oracle Corpration. All Rights Reserved.