Package org.sam.server.constant
Enum HttpStatus
- java.lang.Object
-
- java.lang.Enum<HttpStatus>
-
- org.sam.server.constant.HttpStatus
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<HttpStatus>
public enum HttpStatus extends java.lang.Enum<HttpStatus>
HTTP 응답 상태 상수
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BAD_REQUEST
CREATED
FORBIDDEN
INTERNAL_SERVER_ERROR
METHOD_NOT_ALLOWED
NO_CONTENT
NOT_FOUND
NOT_IMPLEMENTED
OK
UNAUTHORIZED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpErrorType
errorType()
java.lang.String
getCode()
java.lang.String
getMessage()
boolean
isError()
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.
-
-
-
Enum Constant Detail
-
OK
public static final HttpStatus OK
-
CREATED
public static final HttpStatus CREATED
-
NO_CONTENT
public static final HttpStatus NO_CONTENT
-
BAD_REQUEST
public static final HttpStatus BAD_REQUEST
-
UNAUTHORIZED
public static final HttpStatus UNAUTHORIZED
-
FORBIDDEN
public static final HttpStatus FORBIDDEN
-
NOT_FOUND
public static final HttpStatus NOT_FOUND
-
METHOD_NOT_ALLOWED
public static final HttpStatus METHOD_NOT_ALLOWED
-
NOT_IMPLEMENTED
public static final HttpStatus NOT_IMPLEMENTED
-
INTERNAL_SERVER_ERROR
public static final HttpStatus INTERNAL_SERVER_ERROR
-
-
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 namejava.lang.NullPointerException
- if the argument is null
-
getCode
public java.lang.String getCode()
-
getMessage
public java.lang.String getMessage()
-
isError
public boolean isError()
-
errorType
public HttpErrorType errorType()
-
-