Class PubServerExceptionMapper
- java.lang.Object
-
- com.priint.pubserver.webservice.exceptionmapper.PubServerExceptionMapper
-
- All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<PubServerException>
@Provider public class PubServerExceptionMapper extends java.lang.Object implements javax.ws.rs.ext.ExceptionMapper<PubServerException>
Wraps allPubServerExceptions thrown by any service method to the container into an instance of a {link ServiceResult} object. So clients have a standard way to deserialize all service results.Note: If the request cannot be served due to a malformed request the client will receive the default exception format of the container, which may be an HTML formatted text. This will e.g. happen if the clients sends a request without an "Accept" header.
- Since:
- 4.0.5
-
-
Constructor Summary
Constructors Constructor Description PubServerExceptionMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponsetoResponse(PubServerException e)
-
-
-
Method Detail
-
toResponse
public javax.ws.rs.core.Response toResponse(PubServerException e)
- Specified by:
toResponsein interfacejavax.ws.rs.ext.ExceptionMapper<PubServerException>
-
-