com.supermap.services.rest

Class IllegalArgumentExceptionMapper

  • java.lang.Object
    • com.supermap.services.rest.IllegalArgumentExceptionMapper
  • All Implemented Interfaces:
    HttpServletRequestAware, javax.ws.rs.ext.ExceptionMapper<java.lang.IllegalArgumentException>


    public class IllegalArgumentExceptionMapper
    extends java.lang.Object
    implements javax.ws.rs.ext.ExceptionMapper<java.lang.IllegalArgumentException>, HttpServletRequestAware
    

    The illegal argument exception mapping class, which is used to convert the exception caused by illegal parameters 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.
      javax.ws.rs.core.Response toResponse(java.lang.IllegalArgumentException e)
      Converts the exception caused by illegal parameters into resource response (javax.ws.rs.core.Response).
      • Methods inherited from class java.lang.Object

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

      • IllegalArgumentExceptionMapper

        public IllegalArgumentExceptionMapper()
        
    • Method Detail

      • toResponse

        public javax.ws.rs.core.Response toResponse(java.lang.IllegalArgumentException e)
        

        Converts the exception caused by illegal parameters into resource response (javax.ws.rs.core.Response).

        Specified by:
        toResponse in interface javax.ws.rs.ext.ExceptionMapper<java.lang.IllegalArgumentException>
        Parameters:
        e - The illegal argument exception to be converted.
        Returns:
        The resource responses.