Package systems.dmx.core.util
Class UniversalExceptionMapper
- java.lang.Object
- 
- systems.dmx.core.util.UniversalExceptionMapper
 
- 
 public class UniversalExceptionMapper extends Object Maps exceptions to suitable HTTP responses.Supports both, JAX-RS responses and Servlet API responses. 2 additional aspects are handled: - Logging the exception. - Enriching the response with an error entity. 
- 
- 
Constructor SummaryConstructors Constructor Description UniversalExceptionMapper(Throwable e, javax.servlet.http.HttpServletRequest request)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitResponse(javax.servlet.http.HttpServletResponse response)javax.ws.rs.core.ResponsetoResponse()
 
- 
- 
- 
Constructor Detail- 
UniversalExceptionMapperpublic UniversalExceptionMapper(Throwable e, javax.servlet.http.HttpServletRequest request) 
 
- 
 - 
Method Detail- 
toResponsepublic javax.ws.rs.core.Response toResponse() 
 - 
initResponsepublic void initResponse(javax.servlet.http.HttpServletResponse response) throws IOException- Throws:
- IOException
 
 
- 
 
-