java.lang.Object
de.hybris.platform.integrationservices.util.HttpStatus

public class HttpStatus extends Object
Value object for HTTP status code and invariants associated with it.
  • Field Details

    • 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 Details

    • 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 HttpCode initialized to the status code value.
    • isSuccessful

      public boolean isSuccessful()
      Determines whether the status code indicates a successful processing
      Returns:
      true only, 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:
      true only, 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(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object