Package org.jivesoftware.smack.util
Class Async.ThrowingRunnable
- java.lang.Object
-
- org.jivesoftware.smack.util.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
LikeRunnable
, but allows therunOrThrow()
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
-
Constructor Summary
Constructors Constructor Description ThrowingRunnable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
run()
abstract void
runOrThrow()
-
-
-
Field Detail
-
LOGGER
public static final java.util.logging.Logger LOGGER
-
-
Constructor Detail
-
ThrowingRunnable
public ThrowingRunnable()
-
-
Method Detail
-
run
public final void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
runOrThrow
public abstract void runOrThrow() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-