public final class Statuses
extends java.lang.Object
response status type
instances.| Modifier and Type | Class and Description |
|---|---|
private static class |
Statuses.StatusImpl |
| Modifier | Constructor and Description |
|---|---|
private |
Statuses()
Prevents instantiation.
|
| Modifier and Type | Method and Description |
|---|---|
static javax.ws.rs.core.Response.StatusType |
from(int code)
Create a new status type instance.
|
static javax.ws.rs.core.Response.StatusType |
from(int code,
java.lang.String reason)
Create a new status type instance with a custom reason phrase.
|
static javax.ws.rs.core.Response.StatusType |
from(javax.ws.rs.core.Response.StatusType status,
java.lang.String reason)
Create a new status type instance with a custom reason phrase.
|
public static javax.ws.rs.core.Response.StatusType from(int code)
For standard status codes listed in Response.Status enum, the default reason phrase
is used. For any other status code an empty string is used as a reason phrase.
code - response status code.public static javax.ws.rs.core.Response.StatusType from(int code,
java.lang.String reason)
code - response status code.reason - custom response status reason phrase.public static javax.ws.rs.core.Response.StatusType from(javax.ws.rs.core.Response.StatusType status,
java.lang.String reason)
status - response status type.reason - custom response status reason phrase.