org.glassfish.grizzly.http.util
Class HttpStatus
java.lang.Object
org.glassfish.grizzly.http.util.HttpStatus
public class HttpStatus
- extends java.lang.Object
This enum encapsulates the HTTP response status and
reason phrases as defined by RFC 2616.
- Since:
- 2.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
newHttpStatus
public static HttpStatus newHttpStatus(int statusCode,
java.lang.String reasonPhrase)
getHttpStatus
public static HttpStatus getHttpStatus(int statusCode)
- Parameters:
statusCode - HTTP status code
- Returns:
Buffer representation of the status.
getStatusCode
public int getStatusCode()
- Returns:
- the
int status code.
getStatusBytes
public byte[] getStatusBytes()
getReasonPhraseBytes
public byte[] getReasonPhraseBytes()
- Returns:
- the bytes 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.
filter
public static java.lang.String filter(java.lang.String message)
- Filter the specified message string for characters that are sensitive
in HTML. This avoids potential attacks caused by including JavaScript
codes in the request URL that is often reported in error messages.
- Parameters:
message - The message string to be filtered
Copyright © 2011 Oracle Corpration. All Rights Reserved.