public class IllegalArgumentExceptionMapper extends java.lang.Object implements javax.ws.rs.ext.ExceptionMapper<java.lang.IllegalArgumentException>, HttpServletRequestAware
The illegal argument exception mapping class, which is used to convert the exception caused by illegal parameters into resource response (javax.ws.rs.core.Response).
Constructor and Description |
---|
IllegalArgumentExceptionMapper() |
Modifier and Type | Method and Description |
---|---|
void |
setHttpServletRequest(HttpServletRequest request)
Sets an HTTP request.
|
javax.ws.rs.core.Response |
toResponse(java.lang.IllegalArgumentException e)
Converts the exception caused by illegal parameters into resource response (javax.ws.rs.core.Response).
|
@Context public void setHttpServletRequest(@Context HttpServletRequest request)
HttpServletRequestAware
Sets an HTTP request.
setHttpServletRequest
in interface HttpServletRequestAware
public javax.ws.rs.core.Response toResponse(java.lang.IllegalArgumentException e)
Converts the exception caused by illegal parameters into resource response (javax.ws.rs.core.Response).
toResponse
in interface javax.ws.rs.ext.ExceptionMapper<java.lang.IllegalArgumentException>
e
- The illegal argument exception to be converted.