public final class Statuses extends Object
response status type
instances.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,
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,
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, 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, String reason)
status
- response status type.reason
- custom response status reason phrase.Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.