Class HttpStatus
java.lang.Object
de.hybris.platform.integrationservices.util.HttpStatus
Value object for HTTP status code and invariants associated with it.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HttpStatusstatic final HttpStatusstatic final HttpStatusstatic final HttpStatusstatic final HttpStatusstatic final HttpStatus -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanisError()Determines whether the status code indicates an error processingbooleanDetermines whether the status code indicates a successful processingtoString()static HttpStatusvalueOf(int code) Creates new status code from the status code value.
-
Field Details
-
CONTINUE
-
OK
-
CREATED
-
MULTIPLE_CHOICES
-
BAD_REQUEST
-
INTERNAL_SERVER_ERROR
-
-
Method Details
-
valueOf
Creates new status code from the status code value.- Parameters:
code- a status code value, e.g. 200 for OK, 404 for not found, etc.- Returns:
- an
HttpCodeinitialized to the status code value.
-
isSuccessful
public boolean isSuccessful()Determines whether the status code indicates a successful processing- Returns:
trueonly, if the status code belongs to the SUCCESS group of 2xx values;false, otherwise.
-
isError
public boolean isError()Determines whether the status code indicates an error processing- Returns:
trueonly, if the status code belongs to either USER ERROR group with 4xx values or to SERVER ERROR group with 5xx values;false, otherwise.
-
equals
-
hashCode
public int hashCode() -
toString
-