Package ai.platon.pulsar.common.http
Interface HttpStatusCode
-
- All Implemented Interfaces:
public interface HttpStatusCode
-
-
Method Summary
Modifier and Type Method Description abstract Booleanis1xxInformational()Whether this status code is in the Informational class ( 1xx).abstract Booleanis2xxSuccessful()Whether this status code is in the Successful class ( 2xx).abstract Booleanis3xxRedirection()Whether this status code is in the Redirection class ( 3xx).abstract Booleanis4xxClientError()Whether this status code is in the Client Error class ( 4xx).abstract Booleanis5xxServerError()Whether this status code is in the Server Error class ( 5xx).abstract BooleanisError()Whether this status code is in the Client or Server Error class BooleanisSameCodeAs(HttpStatusCode other)Whether this HttpStatusCodeshares the same integer .HttpStatusCodevalueOf(Integer code)Return an HttpStatusCodeobject for the given integer value.abstract IntegergetValue()Return the integer value of this status code. -
-
Method Detail
-
is1xxInformational
abstract Boolean is1xxInformational()
Whether this status code is in the Informational class (
1xx).
-
is2xxSuccessful
abstract Boolean is2xxSuccessful()
Whether this status code is in the Successful class (
2xx).
-
is3xxRedirection
abstract Boolean is3xxRedirection()
Whether this status code is in the Redirection class (
3xx).
-
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).
-
isSameCodeAs
Boolean isSameCodeAs(HttpStatusCode other)
Whether this
HttpStatusCodeshares 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 otherHttpStatusCodeto compare- Returns:
true if the two
HttpStatusCodeobjects share the same integervalue(), false otherwise- Since:
6.0.5
-
valueOf
HttpStatusCode valueOf(Integer code)
Return an
HttpStatusCodeobject for the given integer value.- Parameters:
code- the status code as integer- Returns:
the corresponding
HttpStatusCode
-
-
-
-