Class WebApplicationExceptionMapper

  • All Implemented Interfaces:
    javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.WebApplicationException>

    @Provider
    public class WebApplicationExceptionMapper
    extends AbstractMapper<javax.ws.rs.WebApplicationException>
    Exception mapper for WebApplicationExceptions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response.Status responseStatus()
      Returns the response status to be given when the exception occurs.
      javax.ws.rs.core.Response toResponse​(javax.ws.rs.WebApplicationException e)
      Extracts and returns the response from a WebApplicationException.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebApplicationExceptionMapper

        public WebApplicationExceptionMapper()
    • Method Detail

      • toResponse

        public javax.ws.rs.core.Response toResponse​(javax.ws.rs.WebApplicationException e)
        Extracts and returns the response from a WebApplicationException.
        Specified by:
        toResponse in interface javax.ws.rs.ext.ExceptionMapper<javax.ws.rs.WebApplicationException>
        Overrides:
        toResponse in class AbstractMapper<javax.ws.rs.WebApplicationException>
        Parameters:
        e - WebApplicationException that was thrown
        Returns:
        precomputed Response from the exception
      • responseStatus

        public javax.ws.rs.core.Response.Status responseStatus()
        Description copied from class: AbstractMapper
        Returns the response status to be given when the exception occurs.
        Specified by:
        responseStatus in class AbstractMapper<javax.ws.rs.WebApplicationException>
        Returns:
        response status