Class HttpStatusHolder
java.lang.Object
org.springframework.cloud.gateway.server.mvc.common.HttpStatusHolder
-
Constructor Summary
ConstructorsConstructorDescriptionHttpStatusHolder(org.springframework.http.HttpStatusCode httpStatus, Integer status) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.HttpStatusCodeorg.springframework.http.HttpStatus.SeriesbooleanWhether this status code is in the HTTP seriesHttpStatus.Series.INFORMATIONAL.booleanWhether this status code is in the HTTP seriesHttpStatus.Series.SUCCESSFUL.booleanWhether this status code is in the HTTP seriesHttpStatus.Series.REDIRECTION.booleanWhether this status code is in the HTTP seriesHttpStatus.Series.CLIENT_ERROR.booleanWhether this status code is in the HTTP seriesHttpStatus.Series.SERVER_ERROR.booleanisError()Whether this status code is in the HTTP seriesHttpStatus.Series.CLIENT_ERRORorHttpStatus.Series.SERVER_ERROR.org.springframework.http.HttpStatusCoderesolve()Resolves anHttpStatusCode.toString()static HttpStatusHolder
-
Constructor Details
-
HttpStatusHolder
-
-
Method Details
-
valueOf
-
resolve
public org.springframework.http.HttpStatusCode resolve()Resolves anHttpStatusCode.- 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
-
is1xxInformational
public boolean is1xxInformational()Whether this status code is in the HTTP seriesHttpStatus.Series.INFORMATIONAL.- Returns:
trueif status code is in the INFORMATIONAL http series
-
is2xxSuccessful
public boolean is2xxSuccessful()Whether this status code is in the HTTP seriesHttpStatus.Series.SUCCESSFUL.- Returns:
trueif status code is in the SUCCESSFUL http series
-
is3xxRedirection
public boolean is3xxRedirection()Whether this status code is in the HTTP seriesHttpStatus.Series.REDIRECTION.- Returns:
trueif 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:
trueif 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:
trueif 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_ERRORorHttpStatus.Series.SERVER_ERROR.- Returns:
trueif is either CLIENT_ERROR or SERVER_ERROR
-
toString
-