public class HttpStatusHolder extends Object
Constructor and Description |
---|
HttpStatusHolder(org.springframework.http.HttpStatus httpStatus,
Integer status) |
Modifier and Type | Method and Description |
---|---|
org.springframework.http.HttpStatus |
getHttpStatus() |
org.springframework.http.HttpStatus.Series |
getSeries() |
Integer |
getStatus() |
boolean |
is1xxInformational()
Whether this status code is in the HTTP series
HttpStatus.Series.INFORMATIONAL . |
boolean |
is2xxSuccessful()
Whether this status code is in the HTTP series
HttpStatus.Series.SUCCESSFUL . |
boolean |
is3xxRedirection()
Whether this status code is in the HTTP series
HttpStatus.Series.REDIRECTION . |
boolean |
is4xxClientError()
Whether this status code is in the HTTP series
HttpStatus.Series.CLIENT_ERROR . |
boolean |
is5xxServerError()
Whether this status code is in the HTTP series
HttpStatus.Series.SERVER_ERROR . |
boolean |
isError()
Whether this status code is in the HTTP series
HttpStatus.Series.CLIENT_ERROR or
HttpStatus.Series.SERVER_ERROR . |
static HttpStatusHolder |
parse(String status) |
String |
toString() |
public HttpStatusHolder(org.springframework.http.HttpStatus httpStatus, Integer status)
public static HttpStatusHolder parse(String status)
public org.springframework.http.HttpStatus getHttpStatus()
public Integer getStatus()
public boolean is1xxInformational()
HttpStatus.Series.INFORMATIONAL
.true
if status code is in the INFORMATIONAL http seriespublic boolean is2xxSuccessful()
HttpStatus.Series.SUCCESSFUL
.true
if status code is in the SUCCESSFUL http seriespublic boolean is3xxRedirection()
HttpStatus.Series.REDIRECTION
.true
if status code is in the REDIRECTION http seriespublic boolean is4xxClientError()
HttpStatus.Series.CLIENT_ERROR
.true
if status code is in the CLIENT_ERROR http seriespublic boolean is5xxServerError()
HttpStatus.Series.SERVER_ERROR
.true
if status code is in the SERVER_ERROR http seriespublic org.springframework.http.HttpStatus.Series getSeries()
public boolean isError()
HttpStatus.Series.CLIENT_ERROR
or
HttpStatus.Series.SERVER_ERROR
.true
if is either CLIENT_ERROR or SERVER_ERRORCopyright © 2019 Pivotal Software, Inc.. All rights reserved.