public abstract class AbstractRunnable extends Object implements 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(Throwable t)
This method is invoked for all exception thrown by
doRun() |
void |
onRejection(Throwable t)
This should be executed if the thread-pool executing this action rejected the execution.
|
void |
run() |
public boolean isForceExecution()
public void onAfter()
public abstract void onFailure(Throwable t)
doRun()
public void onRejection(Throwable t)
onFailure(Throwable)
protected abstract void doRun() throws Exception
Runnable.run()
InterruptedException
- if the run method throws an InterruptedExceptionException
Copyright © 2009–2016. All rights reserved.