public class HttpExceptionMapper extends java.lang.Object implements javax.ws.rs.ext.ExceptionMapper<HttpException>, HttpServletRequestAware
HTTP exception mapping class, which is used to convert the HTTP exception into resource response (javax.ws.rs.core.Response).
| Constructor and Description |
|---|
HttpExceptionMapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
setHttpServletRequest(HttpServletRequest request)
Sets an HTTP request.
|
static MethodResult |
toMethodResult(HttpException e) |
javax.ws.rs.core.Response |
toResponse(HttpException arg0)
Converts the HTTP exception into resource response.
|
@Context
public void setHttpServletRequest(@Context
HttpServletRequest request)
HttpServletRequestAwareSets an HTTP request.
setHttpServletRequest in interface HttpServletRequestAwarepublic javax.ws.rs.core.Response toResponse(HttpException arg0)
Converts the HTTP exception into resource response.
toResponse in interface javax.ws.rs.ext.ExceptionMapper<HttpException>arg0 - The HTTP exception to be converted.public static MethodResult toMethodResult(HttpException e)