com.supermap.services.rest
Class HttpExceptionMapper
- java.lang.Object
-
- com.supermap.services.rest.HttpExceptionMapper
-
- All Implemented Interfaces:
- HttpServletRequestAware, javax.ws.rs.ext.ExceptionMapper<HttpException>
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 Summary
Constructors Constructor and Description HttpExceptionMapper()
-
Method Summary
Methods Modifier and Type Method and Description voidsetHttpServletRequest(HttpServletRequest request)Sets an HTTP request.static MethodResulttoMethodResult(HttpException e)javax.ws.rs.core.ResponsetoResponse(HttpException arg0)Converts the HTTP exception into resource 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(HttpException arg0)
Converts the HTTP exception into resource response.
- Specified by:
toResponsein interfacejavax.ws.rs.ext.ExceptionMapper<HttpException>- Parameters:
arg0- The HTTP exception to be converted.- Returns:
- The resource responses.
-
toMethodResult
public static MethodResult toMethodResult(HttpException e)
-
-