Class GenericUncaughtJerseyExceptionMapper<T extends javax.ws.rs.WebApplicationException,​E>

  • Type Parameters:
    T - The sub-class of WebApplicationException to catch
    E - The entity type wanted in the Response
    All Implemented Interfaces:
    javax.ws.rs.ext.ExceptionMapper<T>
    Direct Known Subclasses:
    UncaughtJerseyExceptionMapper

    public abstract class GenericUncaughtJerseyExceptionMapper<T extends javax.ws.rs.WebApplicationException,​E>
    extends java.lang.Object
    implements javax.ws.rs.ext.ExceptionMapper<T>
    Generic Jersey exception mapper, implementing ExceptionMapper, used to convert uncaught Jersey exceptions to a proper Response to return.
    To implement your own in a Lutece plugin or module using lutece-rest-plugin-rest, extend this class, annotate it with Provider, and add it as a bean in the context.xml file.
    • Constructor Detail

      • GenericUncaughtJerseyExceptionMapper

        public GenericUncaughtJerseyExceptionMapper()
    • Method Detail

      • toResponse

        public javax.ws.rs.core.Response toResponse​(T exception)
        Specified by:
        toResponse in interface javax.ws.rs.ext.ExceptionMapper<T extends javax.ws.rs.WebApplicationException>