com.supermap.services.rest
Class IllegalStateExceptionMapper
- java.lang.Object
-
- com.supermap.services.rest.IllegalStateExceptionMapper
-
- All Implemented Interfaces:
- HttpServletRequestAware, javax.ws.rs.ext.ExceptionMapper<java.lang.IllegalStateException>
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 Summary
Constructors Constructor and Description IllegalStateExceptionMapper()
-
Method Summary
Methods Modifier and Type Method and Description voidsetHttpServletRequest(HttpServletRequest request)Sets an HTTP request.javax.ws.rs.core.ResponsetoResponse(java.lang.IllegalStateException e)Converts the exception caused by calling methods at inappropriate time into resource response (javax.ws.rs.core.Response).
-
-
-
Method Detail
-
setHttpServletRequest
@Context public void setHttpServletRequest(@Context HttpServletRequest request)Description copied from interface:HttpServletRequestAwareSets an HTTP request.
- Specified by:
setHttpServletRequestin interfaceHttpServletRequestAware
-
toResponse
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).
- Specified by:
toResponsein interfacejavax.ws.rs.ext.ExceptionMapper<java.lang.IllegalStateException>- Parameters:
e- The exception caused by calling methods at inappropriate time.- Returns:
- The resource response (javax.ws.rs.core.Response).
-
-