Interface HttpStatusCode

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Boolean is1xxInformational() Whether this status code is in the Informational class (1xx).
      abstract Boolean is2xxSuccessful() Whether this status code is in the Successful class (2xx).
      abstract Boolean is3xxRedirection() Whether this status code is in the Redirection class (3xx).
      abstract Boolean is4xxClientError() Whether this status code is in the Client Error class (4xx).
      abstract Boolean is5xxServerError() Whether this status code is in the Server Error class (5xx).
      abstract Boolean isError() Whether this status code is in the Client or Server Error class
      Boolean isSameCodeAs(HttpStatusCode other) Whether this HttpStatusCode shares the same integer .
      HttpStatusCode valueOf(Integer code) Return an HttpStatusCode object for the given integer value.
      abstract Integer getValue() Return the integer value of this status code.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • is2xxSuccessful

         abstract Boolean is2xxSuccessful()

        Whether this status code is in the Successful class (2xx).

      • is4xxClientError

         abstract Boolean is4xxClientError()

        Whether this status code is in the Client Error class (4xx).

      • is5xxServerError

         abstract Boolean is5xxServerError()

        Whether this status code is in the Server Error class (5xx).

      • isError

         abstract Boolean isError()

        Whether this status code is in the Client or Server Error class

      • isSameCodeAs

         Boolean isSameCodeAs(HttpStatusCode other)

        Whether this HttpStatusCode shares the same integer .value as the other status code.

        Useful for comparisons that take deprecated aliases into account or compare arbitrary implementations of HttpStatusCode (e.g. in place of HttpStatus enum equality).

        Parameters:
        other - the other HttpStatusCode to compare
        Returns:

        true if the two HttpStatusCode objects share the same integer value(), false otherwise

        Since:

        6.0.5

      • valueOf

         HttpStatusCode valueOf(Integer code)

        Return an HttpStatusCode object for the given integer value.

        Parameters:
        code - the status code as integer
        Returns:

        the corresponding HttpStatusCode

      • getValue

         abstract Integer getValue()

        Return the integer value of this status code.