Class JerseyProcessingUncaughtExceptionHandler

  • All Implemented Interfaces:
    java.lang.Thread.UncaughtExceptionHandler

    public class JerseyProcessingUncaughtExceptionHandler
    extends java.lang.Object
    implements java.lang.Thread.UncaughtExceptionHandler
    Uncaught exception handler that can be used by various Jersey request processing thread pools uncaught exceptions.
    Since:
    2.17
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.logging.Logger LOGGER  
      private java.util.logging.Level logLevel  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void uncaughtException​(java.lang.Thread t, java.lang.Throwable e)  
      • Methods inherited from class java.lang.Object

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

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • logLevel

        private final java.util.logging.Level logLevel
    • Constructor Detail

      • JerseyProcessingUncaughtExceptionHandler

        public JerseyProcessingUncaughtExceptionHandler()
        Create new Jersey processing uncaught exception handler.

        All uncaught exceptions will be logged using the WARNING logging level.

      • JerseyProcessingUncaughtExceptionHandler

        public JerseyProcessingUncaughtExceptionHandler​(java.util.logging.Level logLevel)
        Create new Jersey processing uncaught exception handler.

        All uncaught exceptions will be logged using the supplied logging level.

        Parameters:
        logLevel - custom logging level that should be used to log uncaught exceptions.
    • Method Detail

      • uncaughtException

        public void uncaughtException​(java.lang.Thread t,
                                      java.lang.Throwable e)
        Specified by:
        uncaughtException in interface java.lang.Thread.UncaughtExceptionHandler