public enum ResponseCode extends java.lang.Enum<ResponseCode>
Enum Constant and Description |
---|
BAD_REQUEST
The request could not be understood by the server due to malformed syntax.
|
HTTP_VERSION_NOT_SUPPORTED
The server does not support, or refuses to support, the HTTP protocol version that was used in the request message.
|
INTERNAL_SERVER_ERROR
The server encountered an unexpected condition which prevented it from fulfilling the request.
|
NOT_FOUND
The server has not found anything matching the Request-URI.
|
OK
The request has succeeded
|
REQUEST_TIMEOUT
The client did not produce a request within the time that the server was prepared to wait.
|
Modifier and Type | Method and Description |
---|---|
int |
getCode() |
java.lang.String |
toString() |
static ResponseCode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ResponseCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ResponseCode OK
public static final ResponseCode BAD_REQUEST
public static final ResponseCode NOT_FOUND
public static final ResponseCode INTERNAL_SERVER_ERROR
public static final ResponseCode HTTP_VERSION_NOT_SUPPORTED
public static final ResponseCode REQUEST_TIMEOUT
public static ResponseCode[] values()
for (ResponseCode c : ResponseCode.values()) System.out.println(c);
public static ResponseCode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic int getCode()
public java.lang.String toString()
toString
in class java.lang.Enum<ResponseCode>