com.supermap.services.rest

Class IllegalStateExceptionMapper

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


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

    The illegalStateException mapping class.

    IllegalStateException is caused by calling methods illegally or at inappropriate time. This class converts the 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.
      javax.ws.rs.core.Response toResponse(java.lang.IllegalStateException e)
      Converts the exception caused by calling methods at inappropriate time 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

      • IllegalStateExceptionMapper

        public IllegalStateExceptionMapper()
        
    • Method Detail

      • toResponse

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

        Converts the exception caused by calling methods at inappropriate time into resource response (javax.ws.rs.core.Response).

        Specified by:
        toResponse in interface javax.ws.rs.ext.ExceptionMapper<java.lang.IllegalStateException>
        Parameters:
        e - The exception caused by calling methods at inappropriate time.
        Returns:
        The resource response (javax.ws.rs.core.Response).