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).

    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void setHttpServletRequest(HttpServletRequest request)
      Sets an HTTP request.
      static MethodResult toMethodResult(HttpException e) 
      javax.ws.rs.core.Response toResponse(HttpException arg0)
      Converts the HTTP exception into resource response.
      • Methods inherited from class java.lang.Object

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

      • HttpExceptionMapper

        public HttpExceptionMapper()
        
    • Method Detail

      • toResponse

        public javax.ws.rs.core.Response toResponse(HttpException arg0)
        

        Converts the HTTP exception into resource response.

        Specified by:
        toResponse in interface javax.ws.rs.ext.ExceptionMapper<HttpException>
        Parameters:
        arg0 - The HTTP exception to be converted.
        Returns:
        The resource responses.