public abstract class AbstractRunnable extends Objectimplements Runnable
| Constructor and Description |
|---|
AbstractRunnable()
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doRun()
This method has the same semantics as
Runnable
|
boolean |
isForceExecution()
Should the runnable force its execution in case it gets rejected?
|
void |
onAfter()
This method is called in a finally block after successful execution or on a rejection.
|
abstract void |
onFailure(Throwable
This method is invoked for all exception thrown by
doRun()
|
void |
onRejection(Throwable
This should be executed if the thread-pool executing this action rejected the execution.
|
void |
run()
|
public boolean isForceExecution()
public final void run()
public void onAfter()
public abstract void onFailure(Throwablet)
doRun()
public void onRejection(Throwablet)
onFailure(Throwable)
protected abstract void doRun()
throws Exception
Runnable.run()
InterruptedException - if the run method throws an InterruptedException
Exception