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 from the given code. |
static javax.ws.rs.core.Response.StatusType |
from(int code,
String reason)
Creates a new custom
status type initialized from the
status code and reason phrase. |
public static javax.ws.rs.core.Response.StatusType from(int code)
status type
from the given code. Status type if firstly
searched in Response.Status
and if none is found, then a custom one is created and
initialized with status code (with empty reason phrase).code
- Status code.public static javax.ws.rs.core.Response.StatusType from(int code, String reason)
status type
initialized from the
status code and reason phrase.code
- Status code.reason
- Reason phrase.Copyright © 2018 Oracle Corporation. All rights reserved.