public class HttpResponseSender extends Object
| Constructor and Description |
|---|
HttpResponseSender() |
| Modifier and Type | Method and Description |
|---|---|
static javax.ws.rs.core.Response |
sendCreatedResult(Object result)
Creates a callback function that sends newly created object as JSON.
|
static javax.ws.rs.core.Response |
sendDeletedResult(Object result)
Creates a callback function that sends deleted object as JSON.
|
static javax.ws.rs.core.Response |
sendEmptyResult()
Creates a callback function that sends an empty result with 204 status code.
|
static javax.ws.rs.core.Response |
sendError(Exception ex)
Sends error serialized as ErrorDescription object and appropriate HTTP status
code.
|
static javax.ws.rs.core.Response |
sendResult(Object result)
Creates a callback function that sends result as JSON object.
|
public static javax.ws.rs.core.Response sendError(Exception ex)
ex - an error object to be sent.public static javax.ws.rs.core.Response sendResult(Object result)
result - a body object to result.public static javax.ws.rs.core.Response sendEmptyResult()
public static javax.ws.rs.core.Response sendCreatedResult(Object result)
result - a body object to created resultpublic static javax.ws.rs.core.Response sendDeletedResult(Object result)
result - a body object to deleted resultCopyright © 2018. All rights reserved.