public abstract class AbstractRunnable
extends java.lang.Object
implements java.lang.Runnable
Constructor and Description |
---|
AbstractRunnable() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doRun()
This method has the same semantics as
Runnable.run() |
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(java.lang.Exception e)
This method is invoked for all exception thrown by
doRun() |
void |
onRejection(java.lang.Exception e)
This should be executed if the thread-pool executing this action rejected the execution.
|
void |
run() |
public boolean isForceExecution()
public final void run()
run
in interface java.lang.Runnable
public void onAfter()
public abstract void onFailure(java.lang.Exception e)
doRun()
public void onRejection(java.lang.Exception e)
onFailure(Exception)
protected abstract void doRun() throws java.lang.Exception
Runnable.run()
java.lang.InterruptedException
- if the run method throws an InterruptedExceptionjava.lang.Exception