Class ErrorResponseProvider

  • All Implemented Interfaces:
    javax.ws.rs.ext.ExceptionMapper<java.lang.Exception>

    @Provider
    public class ErrorResponseProvider
    extends java.lang.Object
    implements javax.ws.rs.ext.ExceptionMapper<java.lang.Exception>
    This provider handles all exceptions which are not handled by any other provider. This is required to ensure that rest requests return a 500 instead of the html error page from OpenNMS.
    Author:
    mvrueden
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.ws.rs.core.Response toResponse​(java.lang.Exception exception)  
      • Methods inherited from class java.lang.Object

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

      • ErrorResponseProvider

        public ErrorResponseProvider()
    • Method Detail

      • toResponse

        public javax.ws.rs.core.Response toResponse​(java.lang.Exception exception)
        Specified by:
        toResponse in interface javax.ws.rs.ext.ExceptionMapper<java.lang.Exception>