com.linkedin.restli.common
Enum HttpStatus

java.lang.Object
  extended by java.lang.Enum<HttpStatus>
      extended by com.linkedin.restli.common.HttpStatus
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<HttpStatus>

public enum HttpStatus
extends java.lang.Enum<HttpStatus>


Enum Constant Summary
S_100_CONTINUE
           
S_101_SWITCHING_PROTOCOLS
           
S_200_OK
           
S_201_CREATED
           
S_202_ACCEPTED
           
S_203_NON_AUTHORITATIVE_INFORMATION
           
S_204_NO_CONTENT
           
S_205_RESET_CONTENT
           
S_206_PARTIAL_CONTENT
           
S_207_MULTI_STATUS
           
S_300_MULTIPLE_CHOICES
           
S_301_MOVED_PERMANENTLY
           
S_302_FOUND
           
S_303_SEE_OTHER
           
S_304_NOT_MODIFIED
           
S_305_USE_PROXY
           
S_307_TEMPORARY_REDIRECT
           
S_400_BAD_REQUEST
           
S_401_UNAUTHORIZED
           
S_402_PAYMENT_REQUIRED
           
S_403_FORBIDDEN
           
S_404_NOT_FOUND
           
S_405_METHOD_NOT_ALLOWED
           
S_406_NOT_ACCEPTABLE
           
S_407_PROXY_AUTHENTICATION_REQUIRED
           
S_408_REQUEST_TIMEOUT
           
S_409_CONFLICT
           
S_410_GONE
           
S_411_LENGTH_REQUIRED
           
S_412_PRECONDITION_FAILED
           
S_413_REQUEST_ENTITY_TOO_LARGE
           
S_414_REQUEST_URI_TOO_LONG
           
S_415_UNSUPPORTED_MEDIA_TYPE
           
S_416_REQUESTED_RANGE_NOT_SATISFIABLE
           
S_417_EXPECTATION_FAILED
           
S_422_UNPROCESSABLE_ENTITY
           
S_423_LOCKED
           
S_424_FAILED_DEPENDENCY
           
S_428_PRECONDITION_REQUIRED
           
S_429_TOO_MANY_REQUESTS
           
S_500_INTERNAL_SERVER_ERROR
           
S_501_NOT_IMPLEMENTED
           
S_502_BAD_GATEWAY
           
S_503_SERVICE_UNAVAILABLE
           
S_504_GATEWAY_TIMEOUT
           
S_505_HTTP_VERSION_NOT_SUPPORTED
           
 
Method Summary
static HttpStatus fromCode(int code)
          Return the HttpStatus associated with the given status code.
 int getCode()
           
static HttpStatus valueOf(java.lang.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

S_100_CONTINUE

public static final HttpStatus S_100_CONTINUE

S_101_SWITCHING_PROTOCOLS

public static final HttpStatus S_101_SWITCHING_PROTOCOLS

S_200_OK

public static final HttpStatus S_200_OK

S_201_CREATED

public static final HttpStatus S_201_CREATED

S_202_ACCEPTED

public static final HttpStatus S_202_ACCEPTED

S_203_NON_AUTHORITATIVE_INFORMATION

public static final HttpStatus S_203_NON_AUTHORITATIVE_INFORMATION

S_204_NO_CONTENT

public static final HttpStatus S_204_NO_CONTENT

S_205_RESET_CONTENT

public static final HttpStatus S_205_RESET_CONTENT

S_206_PARTIAL_CONTENT

public static final HttpStatus S_206_PARTIAL_CONTENT

S_207_MULTI_STATUS

public static final HttpStatus S_207_MULTI_STATUS

S_300_MULTIPLE_CHOICES

public static final HttpStatus S_300_MULTIPLE_CHOICES

S_301_MOVED_PERMANENTLY

public static final HttpStatus S_301_MOVED_PERMANENTLY

S_302_FOUND

public static final HttpStatus S_302_FOUND

S_303_SEE_OTHER

public static final HttpStatus S_303_SEE_OTHER

S_304_NOT_MODIFIED

public static final HttpStatus S_304_NOT_MODIFIED

S_305_USE_PROXY

public static final HttpStatus S_305_USE_PROXY

S_307_TEMPORARY_REDIRECT

public static final HttpStatus S_307_TEMPORARY_REDIRECT

S_400_BAD_REQUEST

public static final HttpStatus S_400_BAD_REQUEST

S_401_UNAUTHORIZED

public static final HttpStatus S_401_UNAUTHORIZED

S_402_PAYMENT_REQUIRED

public static final HttpStatus S_402_PAYMENT_REQUIRED

S_403_FORBIDDEN

public static final HttpStatus S_403_FORBIDDEN

S_404_NOT_FOUND

public static final HttpStatus S_404_NOT_FOUND

S_405_METHOD_NOT_ALLOWED

public static final HttpStatus S_405_METHOD_NOT_ALLOWED

S_406_NOT_ACCEPTABLE

public static final HttpStatus S_406_NOT_ACCEPTABLE

S_407_PROXY_AUTHENTICATION_REQUIRED

public static final HttpStatus S_407_PROXY_AUTHENTICATION_REQUIRED

S_408_REQUEST_TIMEOUT

public static final HttpStatus S_408_REQUEST_TIMEOUT

S_409_CONFLICT

public static final HttpStatus S_409_CONFLICT

S_410_GONE

public static final HttpStatus S_410_GONE

S_411_LENGTH_REQUIRED

public static final HttpStatus S_411_LENGTH_REQUIRED

S_412_PRECONDITION_FAILED

public static final HttpStatus S_412_PRECONDITION_FAILED

S_413_REQUEST_ENTITY_TOO_LARGE

public static final HttpStatus S_413_REQUEST_ENTITY_TOO_LARGE

S_414_REQUEST_URI_TOO_LONG

public static final HttpStatus S_414_REQUEST_URI_TOO_LONG

S_415_UNSUPPORTED_MEDIA_TYPE

public static final HttpStatus S_415_UNSUPPORTED_MEDIA_TYPE

S_416_REQUESTED_RANGE_NOT_SATISFIABLE

public static final HttpStatus S_416_REQUESTED_RANGE_NOT_SATISFIABLE

S_417_EXPECTATION_FAILED

public static final HttpStatus S_417_EXPECTATION_FAILED

S_422_UNPROCESSABLE_ENTITY

public static final HttpStatus S_422_UNPROCESSABLE_ENTITY

S_423_LOCKED

public static final HttpStatus S_423_LOCKED

S_424_FAILED_DEPENDENCY

public static final HttpStatus S_424_FAILED_DEPENDENCY

S_428_PRECONDITION_REQUIRED

public static final HttpStatus S_428_PRECONDITION_REQUIRED

S_429_TOO_MANY_REQUESTS

public static final HttpStatus S_429_TOO_MANY_REQUESTS

S_500_INTERNAL_SERVER_ERROR

public static final HttpStatus S_500_INTERNAL_SERVER_ERROR

S_501_NOT_IMPLEMENTED

public static final HttpStatus S_501_NOT_IMPLEMENTED

S_502_BAD_GATEWAY

public static final HttpStatus S_502_BAD_GATEWAY

S_503_SERVICE_UNAVAILABLE

public static final HttpStatus S_503_SERVICE_UNAVAILABLE

S_504_GATEWAY_TIMEOUT

public static final HttpStatus S_504_GATEWAY_TIMEOUT

S_505_HTTP_VERSION_NOT_SUPPORTED

public static final HttpStatus S_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(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 name
java.lang.NullPointerException - if the argument is null

getCode

public int getCode()
Returns:
the http status code associated with this HttpStatus

fromCode

public static HttpStatus fromCode(int code)
Return the HttpStatus associated with the given status code.

Parameters:
code - an int representing a valid http status code
Returns:
and HttpStatus