Class Async.ThrowingRunnable

  • All Implemented Interfaces:
    java.lang.Runnable
    Enclosing class:
    Async

    public abstract static class Async.ThrowingRunnable
    extends java.lang.Object
    implements java.lang.Runnable
    Like Runnable, but allows the runOrThrow() method to throw an exception.

    If the exception is an instance of RuntimeException, then it will be re-thrown, otherwise it will be simply logged.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.logging.Logger LOGGER  
    • Field Detail

      • LOGGER

        public static final java.util.logging.Logger LOGGER
    • Method Detail

      • run

        public final void run()
        Specified by:
        run in interface java.lang.Runnable
      • runOrThrow

        public abstract void runOrThrow()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception