public class ThreadContext.ContextPreservingAbstractRunnable extends AbstractRunnable
Modifier and Type | Method and Description |
---|---|
protected 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.
|
void |
onFailure(java.lang.Throwable t)
This method is invoked for all exception thrown by
AbstractRunnable.doRun() |
void |
onRejection(java.lang.Throwable t)
This should be executed if the thread-pool executing this action rejected the execution.
|
java.lang.String |
toString() |
AbstractRunnable |
unwrap() |
run
public boolean isForceExecution()
AbstractRunnable
isForceExecution
in class AbstractRunnable
public void onAfter()
AbstractRunnable
onAfter
in class AbstractRunnable
public void onFailure(java.lang.Throwable t)
AbstractRunnable
AbstractRunnable.doRun()
onFailure
in class AbstractRunnable
public void onRejection(java.lang.Throwable t)
AbstractRunnable
AbstractRunnable.onFailure(Throwable)
onRejection
in class AbstractRunnable
protected void doRun() throws java.lang.Exception
AbstractRunnable
Runnable.run()
doRun
in class AbstractRunnable
java.lang.InterruptedException
- if the run method throws an InterruptedExceptionjava.lang.Exception
public java.lang.String toString()
toString
in class java.lang.Object
public AbstractRunnable unwrap()