Class Async.ThrowingRunnable

java.lang.Object
org.jivesoftware.smack.util.Async.ThrowingRunnable
All Implemented Interfaces:
Runnable
Enclosing class:
Async

public abstract static class Async.ThrowingRunnable extends Object implements 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 Details

    • LOGGER

      public static final Logger LOGGER
  • Constructor Details

    • ThrowingRunnable

      public ThrowingRunnable()
  • Method Details

    • run

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

      public abstract void runOrThrow() throws Exception
      Throws:
      Exception