Class HttpStatus
- java.lang.Object
-
- de.hybris.platform.integrationservices.util.HttpStatus
-
public class HttpStatus extends java.lang.ObjectValue object for HTTP status code and invariants associated with it.
-
-
Field Summary
Fields Modifier and Type Field Description static HttpStatusBAD_REQUESTstatic HttpStatusCONTINUEstatic HttpStatusCREATEDstatic HttpStatusINTERNAL_SERVER_ERRORstatic HttpStatusMULTIPLE_CHOICESstatic HttpStatusOK
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()booleanisError()Determines whether the status code indicates an error processingbooleanisSuccessful()Determines whether the status code indicates a successful processingjava.lang.StringtoString()static HttpStatusvalueOf(int code)Creates new status code from the status code value.
-
-
-
Field Detail
-
CONTINUE
public static final HttpStatus CONTINUE
-
OK
public static final HttpStatus OK
-
CREATED
public static final HttpStatus CREATED
-
MULTIPLE_CHOICES
public static final HttpStatus MULTIPLE_CHOICES
-
BAD_REQUEST
public static final HttpStatus BAD_REQUEST
-
INTERNAL_SERVER_ERROR
public static final HttpStatus INTERNAL_SERVER_ERROR
-
-
Method Detail
-
valueOf
public static HttpStatus valueOf(int code)
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
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-