Class HttpStatusHolder
- java.lang.Object
-
- org.springframework.cloud.gateway.support.HttpStatusHolder
-
public class HttpStatusHolder extends Object
-
-
Constructor Summary
Constructors Constructor Description HttpStatusHolder(org.springframework.http.HttpStatus httpStatus, Integer status)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.HttpStatus
getHttpStatus()
org.springframework.http.HttpStatus.Series
getSeries()
Integer
getStatus()
boolean
is1xxInformational()
Whether this status code is in the HTTP seriesHttpStatus.Series.INFORMATIONAL
.boolean
is2xxSuccessful()
Whether this status code is in the HTTP seriesHttpStatus.Series.SUCCESSFUL
.boolean
is3xxRedirection()
Whether this status code is in the HTTP seriesHttpStatus.Series.REDIRECTION
.boolean
is4xxClientError()
Whether this status code is in the HTTP seriesHttpStatus.Series.CLIENT_ERROR
.boolean
is5xxServerError()
Whether this status code is in the HTTP seriesHttpStatus.Series.SERVER_ERROR
.boolean
isError()
Whether this status code is in the HTTP seriesHttpStatus.Series.CLIENT_ERROR
orHttpStatus.Series.SERVER_ERROR
.static HttpStatusHolder
parse(String status)
String
toString()
-
-
-
Constructor Detail
-
HttpStatusHolder
public HttpStatusHolder(org.springframework.http.HttpStatus httpStatus, Integer status)
-
-
Method Detail
-
parse
public static HttpStatusHolder parse(String status)
-
getHttpStatus
public org.springframework.http.HttpStatus getHttpStatus()
-
getStatus
public Integer getStatus()
-
is1xxInformational
public boolean is1xxInformational()
Whether this status code is in the HTTP seriesHttpStatus.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 seriesHttpStatus.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 seriesHttpStatus.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 seriesHttpStatus.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 seriesHttpStatus.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 seriesHttpStatus.Series.CLIENT_ERROR
orHttpStatus.Series.SERVER_ERROR
.- Returns:
true
if is either CLIENT_ERROR or SERVER_ERROR
-
-