public class IllegalStateExceptionMapper extends java.lang.Object implements javax.ws.rs.ext.ExceptionMapper<java.lang.IllegalStateException>, HttpServletRequestAware
The illegalStateException mapping class.
IllegalStateException is caused by calling methods illegally or at inappropriate time. This class converts the exception into resource response (javax.ws.rs.core.Response).
Constructor and Description |
---|
IllegalStateExceptionMapper() |
Modifier and Type | Method and Description |
---|---|
void |
setHttpServletRequest(HttpServletRequest request)
Sets an HTTP request.
|
javax.ws.rs.core.Response |
toResponse(java.lang.IllegalStateException e)
Converts the exception caused by calling methods at inappropriate time 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.IllegalStateException e)
Converts the exception caused by calling methods at inappropriate time into resource response (javax.ws.rs.core.Response).
toResponse
in interface javax.ws.rs.ext.ExceptionMapper<java.lang.IllegalStateException>
e
- The exception caused by calling methods at inappropriate time.