Class HttpStatusHolder

java.lang.Object
org.springframework.cloud.gateway.server.mvc.common.HttpStatusHolder

@NullUnmarked public class HttpStatusHolder extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    HttpStatusHolder(org.springframework.http.HttpStatusCode httpStatus, Integer status)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.HttpStatusCode
     
    org.springframework.http.HttpStatus.Series
     
     
    boolean
    Whether this status code is in the HTTP series HttpStatus.Series.INFORMATIONAL.
    boolean
    Whether this status code is in the HTTP series HttpStatus.Series.SUCCESSFUL.
    boolean
    Whether this status code is in the HTTP series HttpStatus.Series.REDIRECTION.
    boolean
    Whether this status code is in the HTTP series HttpStatus.Series.CLIENT_ERROR.
    boolean
    Whether this status code is in the HTTP series HttpStatus.Series.SERVER_ERROR.
    boolean
    Whether this status code is in the HTTP series HttpStatus.Series.CLIENT_ERROR or HttpStatus.Series.SERVER_ERROR.
    org.springframework.http.HttpStatusCode
    Resolves an HttpStatusCode.
     
    valueOf(String status)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HttpStatusHolder

      public HttpStatusHolder(org.springframework.http.HttpStatusCode httpStatus, Integer status)
  • Method Details

    • valueOf

      public static HttpStatusHolder valueOf(String status)
    • resolve

      public org.springframework.http.HttpStatusCode resolve()
      Resolves an HttpStatusCode.
      Returns:
      either the httpStatus field if not null, or resolves an HttpStatusCode based on the int status.
    • getHttpStatus

      public org.springframework.http.HttpStatusCode getHttpStatus()
    • getStatus

      public Integer getStatus()
    • is1xxInformational

      public boolean is1xxInformational()
      Whether this status code is in the HTTP series HttpStatus.Series.INFORMATIONAL.
      Returns:
      true if status code is in the INFORMATIONAL http series
    • is2xxSuccessful

      public boolean is2xxSuccessful()
      Whether this status code is in the HTTP series HttpStatus.Series.SUCCESSFUL.
      Returns:
      true if status code is in the SUCCESSFUL http series
    • is3xxRedirection

      public boolean is3xxRedirection()
      Whether this status code is in the HTTP series HttpStatus.Series.REDIRECTION.
      Returns:
      true if status code is in the REDIRECTION http series
    • is4xxClientError

      public boolean is4xxClientError()
      Whether this status code is in the HTTP series HttpStatus.Series.CLIENT_ERROR.
      Returns:
      true if status code is in the CLIENT_ERROR http series
    • is5xxServerError

      public boolean is5xxServerError()
      Whether this status code is in the HTTP series HttpStatus.Series.SERVER_ERROR.
      Returns:
      true if status code is in the SERVER_ERROR http series
    • getSeries

      public org.springframework.http.HttpStatus.Series getSeries()
    • isError

      public boolean isError()
      Whether this status code is in the HTTP series HttpStatus.Series.CLIENT_ERROR or HttpStatus.Series.SERVER_ERROR.
      Returns:
      true if is either CLIENT_ERROR or SERVER_ERROR
    • toString

      public String toString()
      Overrides:
      toString in class Object