public abstract class SreExecutable extends Object
Runnables
for creating an instance.Runnables
Modifier | Constructor and Description |
---|---|
protected |
SreExecutable(logger : Logger)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static String |
exceptionMessage(ex : Throwable)
Replies a not-empty message for the given exception.
|
Throwable |
getException()
Replies the exception that has stopped the task.
|
Logger |
getLogger()
Replies the logger.
|
protected static Throwable |
getRootCause(ex : Throwable)
Replies the root cause of the given exception.
|
boolean |
isSuccess()
Replies if the task was finished on a success.
|
protected boolean |
onError(error : Throwable)
Invoked when an error occurs into the task and after this error is logged out.
|
protected void |
onFinished()
Invoked when the task is finished whatever it is successful or failing.
|
protected volatile var
exception : Throwable
@Pure
public def
getLogger() : Logger
SreExecutable
null
if the platform logger should be used.@Pure
protected static def
exceptionMessage(ex : Throwable) : String
SreExecutable
ex
- the exception.@Pure
protected static def
getRootCause(ex : Throwable) : Throwable
SreExecutable
ex
- the exception for which the root cause msut be determined.@Pure
public def
isSuccess() : boolean
SreExecutable
true
if the task if finished and successful. false
if the task is not not finished or successful.@Pure
public def
getException() : Throwable
SreExecutable
null
if the task was successfully finished.@Pure
protected def
onError(error : Throwable) : boolean
SreExecutable
error
- the error.true
if the error should be thrown in the current thread.
false
if the exception is not thrown.protected def
onFinished() : void
SreExecutable
error
- the error.Copyright © 2021 the original authors or authors.