public class Response extends Object
| Constructor and Description |
|---|
Response() |
| Modifier and Type | Method and Description |
|---|---|
Response |
build() |
static Response |
consumerFailResp(Throwable e) |
static Response |
create(int statusCode,
String reasonPhrase,
Object result) |
static Response |
create(javax.ws.rs.core.Response.StatusType status,
Object result) |
static Response |
createConsumerFail(Throwable throwable) |
static Response |
createFail(InvocationException exception) |
static Response |
createFail(InvocationType invocationType,
String errorMsg) |
static Response |
createFail(InvocationType invocationType,
Throwable throwable) |
static Response |
createProducerFail(Throwable throwable) |
static Response |
createSuccess(Object result) |
static Response |
createSuccess(javax.ws.rs.core.Response.StatusType status,
Object result) |
Response |
entity(Object result) |
static Response |
failResp(InvocationException e) |
static Response |
failResp(InvocationType invocationType,
Throwable e) |
Headers |
getHeaders() |
String |
getReasonPhrase() |
<T> T |
getResult() |
javax.ws.rs.core.Response.StatusType |
getStatus() |
int |
getStatusCode() |
boolean |
isFailed() |
boolean |
isSuccessed() |
static Response |
ok(Object result) |
static Response |
producerFailResp(Throwable e) |
static Response |
providerFailResp(Throwable e) |
void |
setHeaders(Headers headers) |
void |
setResult(Object result) |
void |
setStatus(javax.ws.rs.core.Response.StatusType status) |
static Response |
status(javax.ws.rs.core.Response.StatusType status) |
static Response |
success(Object result,
javax.ws.rs.core.Response.StatusType status) |
static Response |
succResp(Object result) |
public boolean isSuccessed()
public boolean isFailed()
public int getStatusCode()
public String getReasonPhrase()
public javax.ws.rs.core.Response.StatusType getStatus()
public void setStatus(javax.ws.rs.core.Response.StatusType status)
public Headers getHeaders()
public void setHeaders(Headers headers)
public <T> T getResult()
public void setResult(Object result)
public static Response createSuccess(javax.ws.rs.core.Response.StatusType status, Object result)
public static Response createFail(InvocationException exception)
public static Response createFail(InvocationType invocationType, String errorMsg)
public static Response createFail(InvocationType invocationType, Throwable throwable)
public static Response failResp(InvocationException e)
public static Response failResp(InvocationType invocationType, Throwable e)
public Response build()
public static Response status(javax.ws.rs.core.Response.StatusType status)
Copyright © 2017. All rights reserved.