Http.Statuspublic static interface Http.ResponseStatus
Copied from JAX-RS.
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
Http.ResponseStatus.Family |
An enumeration representing the class of status code.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
code() |
Get the associated integer value representing the status code.
|
Http.ResponseStatus.Family |
family() |
Get the class of status code.
|
static Http.ResponseStatus |
from(int statusCode) |
Convert a numerical status code into the corresponding ResponseStatus.
|
static Http.ResponseStatus |
from(int statusCode,
java.lang.String reasonPhrase) |
Convert a numerical status code into the corresponding ResponseStatus.
|
java.lang.String |
reasonPhrase() |
Get the reason phrase.
|
int code()
Http.ResponseStatus.Family family()
java.lang.String reasonPhrase()
static Http.ResponseStatus from(int statusCode)
As opposed to Http.Status.of(int), this method is guaranteed to always return an instance.
For an unknown Http.Status it creates an ad-hoc Http.ResponseStatus.
statusCode - the numerical status codeHttp.Status or an ad-hoc Http.ResponseStatusstatic Http.ResponseStatus from(int statusCode, java.lang.String reasonPhrase)
It either returns an existing Http.Status if possible. For an unknown Http.Status it creates
an ad-hoc Http.ResponseStatus or whenever a custom reason phrase is provided.
statusCode - the numerical status code; if known, a is returnedreasonPhrase - the reason phrase; if null or a known reason phrase, a
Http.Status is returned; otherwise, a new instance is returnedHttp.Status or an ad-hoc Http.ResponseStatusCopyright © 2018 Oracle Corporation. All rights reserved.