org.jboss.netty.handler.codec.http
Class HttpResponseStatus

java.lang.Object
  extended by org.jboss.netty.handler.codec.http.HttpResponseStatus
All Implemented Interfaces:
Comparable<HttpResponseStatus>

public class HttpResponseStatus
extends Object
implements Comparable<HttpResponseStatus>

The response code and its description of HTTP or its derived protocols, such as RTSP and ICAP.

Version:
$Rev: 1767 $, $Date: 2009-10-07 21:38:17 +0900 (수, 07 10 2009) $
Author:
The Netty Project (netty-dev@lists.jboss.org), Andy Taylor (andy.taylor@jboss.org), Trustin Lee (tlee@redhat.com)

Field Summary
static HttpResponseStatus ACCEPTED
          202 Accepted
static HttpResponseStatus BAD_GATEWAY
          502 Bad Gateway
static HttpResponseStatus BAD_REQUEST
          400 Bad Request
static HttpResponseStatus CONFLICT
          409 Conflict
static HttpResponseStatus CONTINUE
          100 Continue
static HttpResponseStatus CREATED
          201 Created
static HttpResponseStatus EXPECTATION_FAILED
          417 Expectation Failed
static HttpResponseStatus FORBIDDEN
          403 Forbidden
static HttpResponseStatus FOUND
          302 Found
static HttpResponseStatus GATEWAY_TIMEOUT
          504 Gateway Timeout
static HttpResponseStatus GONE
          410 Gone
static HttpResponseStatus HTTP_VERSION_NOT_SUPPORTED
          505 HTTP Version Not Supported
static HttpResponseStatus INTERNAL_SERVER_ERROR
          500 Internal Server Error
static HttpResponseStatus LENGTH_REQUIRED
          411 Length Required
static HttpResponseStatus METHOD_NOT_ALLOWED
          405 Method Not Allowed
static HttpResponseStatus MOVED_PERMANENTLY
          301 Moved Permanently
static HttpResponseStatus MULTIPLE_CHOICES
          300 Multiple Choices
static HttpResponseStatus NO_CONTENT
          204 No Content
static HttpResponseStatus NON_AUTHORITATIVE_INFORMATION
          203 Non-Authoritative Information
static HttpResponseStatus NOT_ACCEPTABLE
          406 Not Acceptable
static HttpResponseStatus NOT_FOUND
          404 Not Found
static HttpResponseStatus NOT_IMPLEMENTED
          501 Not Implemented
static HttpResponseStatus NOT_MODIFIED
          304 Not Modified
static HttpResponseStatus OK
          200 OK
static HttpResponseStatus PARTIAL_CONTENT
          206 Partial Content
static HttpResponseStatus PAYMENT_REQUIRED
          402 Payment Required
static HttpResponseStatus PRECONDITION_FAILED
          412 Precondition Failed
static HttpResponseStatus PROXY_AUTHENTICATION_REQUIRED
          407 Proxy Authentication Required
static HttpResponseStatus REQUEST_ENTITY_TOO_LARGE
          413 Request Entity Too Large
static HttpResponseStatus REQUEST_TIMEOUT
          408 Request Timeout
static HttpResponseStatus REQUEST_URI_TOO_LONG
          414 Request-URI Too Long
static HttpResponseStatus REQUESTED_RANGE_NOT_SATISFIABLE
          416 Requested Range Not Satisfiable
static HttpResponseStatus RESET_CONTENT
          205 Reset Content
static HttpResponseStatus SEE_OTHER
          303 See Other
static HttpResponseStatus SERVICE_UNAVAILABLE
          503 Service Unavailable
static HttpResponseStatus SWITCHING_PROTOCOLS
          101 Switching Protocols
static HttpResponseStatus TEMPORARY_REDIRECT
          307 Temporary Redirect
static HttpResponseStatus UNSUPPORTED_MEDIA_TYPE
          415 Unsupported Media Type
static HttpResponseStatus UNUATHORIZED
          401 Unauthorized
static HttpResponseStatus USE_PROXY
          305 Use Proxy
 
Constructor Summary
HttpResponseStatus(int code, String reasonPhrase)
          Creates a new instance with the specified code and its reasonPhrase.
 
Method Summary
 int compareTo(HttpResponseStatus o)
           
 boolean equals(Object o)
           
 int getCode()
          Returns the code of this status.
 String getReasonPhrase()
          Returns the reason phrase of this status.
 int hashCode()
           
 String toString()
           
static HttpResponseStatus valueOf(int code)
          Returns the HttpResponseStatus represented by the specified code.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CONTINUE

public static final HttpResponseStatus CONTINUE
100 Continue


SWITCHING_PROTOCOLS

public static final HttpResponseStatus SWITCHING_PROTOCOLS
101 Switching Protocols


OK

public static final HttpResponseStatus OK
200 OK


CREATED

public static final HttpResponseStatus CREATED
201 Created


ACCEPTED

public static final HttpResponseStatus ACCEPTED
202 Accepted


NON_AUTHORITATIVE_INFORMATION

public static final HttpResponseStatus NON_AUTHORITATIVE_INFORMATION
203 Non-Authoritative Information


NO_CONTENT

public static final HttpResponseStatus NO_CONTENT
204 No Content


RESET_CONTENT

public static final HttpResponseStatus RESET_CONTENT
205 Reset Content


PARTIAL_CONTENT

public static final HttpResponseStatus PARTIAL_CONTENT
206 Partial Content


MULTIPLE_CHOICES

public static final HttpResponseStatus MULTIPLE_CHOICES
300 Multiple Choices


MOVED_PERMANENTLY

public static final HttpResponseStatus MOVED_PERMANENTLY
301 Moved Permanently


FOUND

public static final HttpResponseStatus FOUND
302 Found


SEE_OTHER

public static final HttpResponseStatus SEE_OTHER
303 See Other


NOT_MODIFIED

public static final HttpResponseStatus NOT_MODIFIED
304 Not Modified


USE_PROXY

public static final HttpResponseStatus USE_PROXY
305 Use Proxy


TEMPORARY_REDIRECT

public static final HttpResponseStatus TEMPORARY_REDIRECT
307 Temporary Redirect


BAD_REQUEST

public static final HttpResponseStatus BAD_REQUEST
400 Bad Request


UNUATHORIZED

public static final HttpResponseStatus UNUATHORIZED
401 Unauthorized


PAYMENT_REQUIRED

public static final HttpResponseStatus PAYMENT_REQUIRED
402 Payment Required


FORBIDDEN

public static final HttpResponseStatus FORBIDDEN
403 Forbidden


NOT_FOUND

public static final HttpResponseStatus NOT_FOUND
404 Not Found


METHOD_NOT_ALLOWED

public static final HttpResponseStatus METHOD_NOT_ALLOWED
405 Method Not Allowed


NOT_ACCEPTABLE

public static final HttpResponseStatus NOT_ACCEPTABLE
406 Not Acceptable


PROXY_AUTHENTICATION_REQUIRED

public static final HttpResponseStatus PROXY_AUTHENTICATION_REQUIRED
407 Proxy Authentication Required


REQUEST_TIMEOUT

public static final HttpResponseStatus REQUEST_TIMEOUT
408 Request Timeout


CONFLICT

public static final HttpResponseStatus CONFLICT
409 Conflict


GONE

public static final HttpResponseStatus GONE
410 Gone


LENGTH_REQUIRED

public static final HttpResponseStatus LENGTH_REQUIRED
411 Length Required


PRECONDITION_FAILED

public static final HttpResponseStatus PRECONDITION_FAILED
412 Precondition Failed


REQUEST_ENTITY_TOO_LARGE

public static final HttpResponseStatus REQUEST_ENTITY_TOO_LARGE
413 Request Entity Too Large


REQUEST_URI_TOO_LONG

public static final HttpResponseStatus REQUEST_URI_TOO_LONG
414 Request-URI Too Long


UNSUPPORTED_MEDIA_TYPE

public static final HttpResponseStatus UNSUPPORTED_MEDIA_TYPE
415 Unsupported Media Type


REQUESTED_RANGE_NOT_SATISFIABLE

public static final HttpResponseStatus REQUESTED_RANGE_NOT_SATISFIABLE
416 Requested Range Not Satisfiable


EXPECTATION_FAILED

public static final HttpResponseStatus EXPECTATION_FAILED
417 Expectation Failed


INTERNAL_SERVER_ERROR

public static final HttpResponseStatus INTERNAL_SERVER_ERROR
500 Internal Server Error


NOT_IMPLEMENTED

public static final HttpResponseStatus NOT_IMPLEMENTED
501 Not Implemented


BAD_GATEWAY

public static final HttpResponseStatus BAD_GATEWAY
502 Bad Gateway


SERVICE_UNAVAILABLE

public static final HttpResponseStatus SERVICE_UNAVAILABLE
503 Service Unavailable


GATEWAY_TIMEOUT

public static final HttpResponseStatus GATEWAY_TIMEOUT
504 Gateway Timeout


HTTP_VERSION_NOT_SUPPORTED

public static final HttpResponseStatus HTTP_VERSION_NOT_SUPPORTED
505 HTTP Version Not Supported

Constructor Detail

HttpResponseStatus

public HttpResponseStatus(int code,
                          String reasonPhrase)
Creates a new instance with the specified code and its reasonPhrase.

Method Detail

valueOf

public static final HttpResponseStatus valueOf(int code)
Returns the HttpResponseStatus represented by the specified code. If the specified code is a standard HTTP status code, a cached instance will be returned. Otherwise, a new instance will be returned.


getCode

public int getCode()
Returns the code of this status.


getReasonPhrase

public String getReasonPhrase()
Returns the reason phrase of this status.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

compareTo

public int compareTo(HttpResponseStatus o)
Specified by:
compareTo in interface Comparable<HttpResponseStatus>

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2008-2009 JBoss, by Red Hat. All Rights Reserved.