Enum HttpStatusCodes
- java.lang.Object
-
- java.lang.Enum<HttpStatusCodes>
-
- org.apache.olingo.odata2.api.commons.HttpStatusCodes
-
- All Implemented Interfaces:
Serializable,Comparable<HttpStatusCodes>
public enum HttpStatusCodes extends Enum<HttpStatusCodes>
HTTP status codes as defined in RFC2616-sec10 and additional status codes as defined in RFC6585
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpStatusCodesfromStatusCode(int statusCode)Convert a numerical status code into the corresponding status enum object.StringgetInfo()Get the status code info.intgetStatusCode()Get the associated status code.StringtoString()Get the status code info.static HttpStatusCodesvalueOf(String name)Returns the enum constant of this type with the specified name.static HttpStatusCodes[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
OK
public static final HttpStatusCodes OK
-
CREATED
public static final HttpStatusCodes CREATED
-
ACCEPTED
public static final HttpStatusCodes ACCEPTED
-
NO_CONTENT
public static final HttpStatusCodes NO_CONTENT
-
RESET_CONTENT
public static final HttpStatusCodes RESET_CONTENT
-
PARTIAL_CONTENT
public static final HttpStatusCodes PARTIAL_CONTENT
-
MOVED_PERMANENTLY
public static final HttpStatusCodes MOVED_PERMANENTLY
-
FOUND
public static final HttpStatusCodes FOUND
-
SEE_OTHER
public static final HttpStatusCodes SEE_OTHER
-
NOT_MODIFIED
public static final HttpStatusCodes NOT_MODIFIED
-
USE_PROXY
public static final HttpStatusCodes USE_PROXY
-
TEMPORARY_REDIRECT
public static final HttpStatusCodes TEMPORARY_REDIRECT
-
BAD_REQUEST
public static final HttpStatusCodes BAD_REQUEST
-
UNAUTHORIZED
public static final HttpStatusCodes UNAUTHORIZED
-
PAYMENT_REQUIRED
public static final HttpStatusCodes PAYMENT_REQUIRED
-
FORBIDDEN
public static final HttpStatusCodes FORBIDDEN
-
NOT_FOUND
public static final HttpStatusCodes NOT_FOUND
-
METHOD_NOT_ALLOWED
public static final HttpStatusCodes METHOD_NOT_ALLOWED
-
NOT_ACCEPTABLE
public static final HttpStatusCodes NOT_ACCEPTABLE
-
PROXY_AUTHENTICATION_REQUIRED
public static final HttpStatusCodes PROXY_AUTHENTICATION_REQUIRED
-
REQUEST_TIMEOUT
public static final HttpStatusCodes REQUEST_TIMEOUT
-
CONFLICT
public static final HttpStatusCodes CONFLICT
-
GONE
public static final HttpStatusCodes GONE
-
LENGTH_REQUIRED
public static final HttpStatusCodes LENGTH_REQUIRED
-
PRECONDITION_FAILED
public static final HttpStatusCodes PRECONDITION_FAILED
-
REQUEST_ENTITY_TOO_LARGE
public static final HttpStatusCodes REQUEST_ENTITY_TOO_LARGE
-
REQUEST_URI_TOO_LONG
public static final HttpStatusCodes REQUEST_URI_TOO_LONG
-
UNSUPPORTED_MEDIA_TYPE
public static final HttpStatusCodes UNSUPPORTED_MEDIA_TYPE
-
REQUESTED_RANGE_NOT_SATISFIABLE
public static final HttpStatusCodes REQUESTED_RANGE_NOT_SATISFIABLE
-
EXPECTATION_FAILED
public static final HttpStatusCodes EXPECTATION_FAILED
-
PRECONDITION_REQUIRED
public static final HttpStatusCodes PRECONDITION_REQUIRED
-
INTERNAL_SERVER_ERROR
public static final HttpStatusCodes INTERNAL_SERVER_ERROR
-
NOT_IMPLEMENTED
public static final HttpStatusCodes NOT_IMPLEMENTED
-
BAD_GATEWAY
public static final HttpStatusCodes BAD_GATEWAY
-
SERVICE_UNAVAILABLE
public static final HttpStatusCodes SERVICE_UNAVAILABLE
-
GATEWAY_TIMEOUT
public static final HttpStatusCodes GATEWAY_TIMEOUT
-
HTTP_VERSION_NOT_SUPPORTED
public static final HttpStatusCodes HTTP_VERSION_NOT_SUPPORTED
-
-
Method Detail
-
values
public static HttpStatusCodes[] 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 (HttpStatusCodes c : HttpStatusCodes.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HttpStatusCodes 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 nameNullPointerException- if the argument is null
-
fromStatusCode
public static HttpStatusCodes fromStatusCode(int statusCode)
Convert a numerical status code into the corresponding status enum object.- Parameters:
statusCode- the numerical status code- Returns:
- the matching status enum object or null if no matching enum is defined
-
getStatusCode
public int getStatusCode()
Get the associated status code.- Returns:
- the status code.
-
getInfo
public String getInfo()
Get the status code info.- Returns:
- the status code info
-
toString
public String toString()
Get the status code info.- Overrides:
toStringin classEnum<HttpStatusCodes>- Returns:
- the status code info
-
-