Package com.persequor.rest
Class HttpStatusCodes
java.lang.Object
com.persequor.rest.HttpStatusCodes
Constants enumerating the HTTP status codes. Includes status codes specified in RFC2616 (HTTP/1.1).
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intStatus code for a successful request that has been received but not yet acted upon.static final intStatus code for a bad gateway.static final intStatus code for a request that could not be understood by the server.static final intStatus code for a request that could not be completed due to a resource conflict.static final intStatus code for a successful request that has been fulfilled to create a new resource.static final intStatus code for a server that understood the request, but is refusing to fulfill it.static final intStatus code for a resource that has temporarily moved to a new URI.static final intstatic final intStatus code for a method specified in the Request-Line is not allowed for the resource identified by the Request-URI.static final intStatus code for a resource that has permanently moved to a new URI.static final intStatus code for a resource corresponding to any one of a set of representations.static final intStatus code for a successful request with no content information.static final intStatus code for a server that has not found anything matching the Request-URI.static final intStatus code for a resource that access is allowed but the document has not been modified.static final intStatus code for a successful request.static final intStatus code for a request for which one of the conditions it was made under has failed.static final intStatus code for a resource that has moved to a new URI and should be retrieved using GET.static final intStatus code for an internal server error.static final intStatus code for a service that is unavailable on the server.static final intStatus code for a resource that has temporarily moved to a new URI.static final intStatus code for a request that requires user authentication.static final intStatus code for a request for which the content-type and the request's syntax were correct but server was not able to process entity.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanisRedirect(int statusCode) Returns whether the given HTTP response status code is a redirect code301, 302, 303, 307, 308.static booleanisSuccess(int statusCode) Returns whether the given HTTP response status code is a success code>= 200 and < 300.
- 
Field Details- 
STATUS_CODE_OKpublic static final int STATUS_CODE_OKStatus code for a successful request.- See Also:
 
- 
STATUS_CODE_CREATEDpublic static final int STATUS_CODE_CREATEDStatus code for a successful request that has been fulfilled to create a new resource.- See Also:
 
- 
STATUS_CODE_ACCEPTEDpublic static final int STATUS_CODE_ACCEPTEDStatus code for a successful request that has been received but not yet acted upon.- See Also:
 
- 
STATUS_CODE_NO_CONTENTpublic static final int STATUS_CODE_NO_CONTENTStatus code for a successful request with no content information.- See Also:
 
- 
STATUS_CODE_MULTIPLE_CHOICESpublic static final int STATUS_CODE_MULTIPLE_CHOICESStatus code for a resource corresponding to any one of a set of representations.- See Also:
 
- 
STATUS_CODE_MOVED_PERMANENTLYpublic static final int STATUS_CODE_MOVED_PERMANENTLYStatus code for a resource that has permanently moved to a new URI.- See Also:
 
- 
STATUS_CODE_FOUNDpublic static final int STATUS_CODE_FOUNDStatus code for a resource that has temporarily moved to a new URI.- See Also:
 
- 
STATUS_CODE_SEE_OTHERpublic static final int STATUS_CODE_SEE_OTHERStatus code for a resource that has moved to a new URI and should be retrieved using GET.- See Also:
 
- 
STATUS_CODE_NOT_MODIFIEDpublic static final int STATUS_CODE_NOT_MODIFIEDStatus code for a resource that access is allowed but the document has not been modified.- See Also:
 
- 
STATUS_CODE_TEMPORARY_REDIRECTpublic static final int STATUS_CODE_TEMPORARY_REDIRECTStatus code for a resource that has temporarily moved to a new URI.- See Also:
 
- 
STATUS_CODE_BAD_REQUESTpublic static final int STATUS_CODE_BAD_REQUESTStatus code for a request that could not be understood by the server.- See Also:
 
- 
STATUS_CODE_UNAUTHORIZEDpublic static final int STATUS_CODE_UNAUTHORIZEDStatus code for a request that requires user authentication.- See Also:
 
- 
STATUS_CODE_FORBIDDENpublic static final int STATUS_CODE_FORBIDDENStatus code for a server that understood the request, but is refusing to fulfill it.- See Also:
 
- 
STATUS_CODE_NOT_FOUNDpublic static final int STATUS_CODE_NOT_FOUNDStatus code for a server that has not found anything matching the Request-URI.- See Also:
 
- 
STATUS_CODE_METHOD_NOT_ALLOWEDpublic static final int STATUS_CODE_METHOD_NOT_ALLOWEDStatus code for a method specified in the Request-Line is not allowed for the resource identified by the Request-URI.- See Also:
 
- 
STATUS_CODE_CONFLICTpublic static final int STATUS_CODE_CONFLICTStatus code for a request that could not be completed due to a resource conflict.- See Also:
 
- 
STATUS_CODE_PRECONDITION_FAILEDpublic static final int STATUS_CODE_PRECONDITION_FAILEDStatus code for a request for which one of the conditions it was made under has failed.- See Also:
 
- 
STATUS_CODE_I_AM_A_TEAPOTpublic static final int STATUS_CODE_I_AM_A_TEAPOT- See Also:
 
- 
STATUS_CODE_UNPROCESSABLE_ENTITYpublic static final int STATUS_CODE_UNPROCESSABLE_ENTITYStatus code for a request for which the content-type and the request's syntax were correct but server was not able to process entity.- See Also:
 
- 
STATUS_CODE_SERVER_ERRORpublic static final int STATUS_CODE_SERVER_ERRORStatus code for an internal server error.- See Also:
 
- 
STATUS_CODE_BAD_GATEWAYpublic static final int STATUS_CODE_BAD_GATEWAYStatus code for a bad gateway.- See Also:
 
- 
STATUS_CODE_SERVICE_UNAVAILABLEpublic static final int STATUS_CODE_SERVICE_UNAVAILABLEStatus code for a service that is unavailable on the server.- See Also:
 
 
- 
- 
Constructor Details- 
HttpStatusCodespublic HttpStatusCodes()
 
- 
- 
Method Details- 
isSuccesspublic static boolean isSuccess(int statusCode) Returns whether the given HTTP response status code is a success code>= 200 and < 300.
- 
isRedirectpublic static boolean isRedirect(int statusCode) Returns whether the given HTTP response status code is a redirect code301, 302, 303, 307, 308.
 
-