public abstract class Worker<T extends Result> extends Observable implements Runnable
| Constructor and Description |
|---|
Worker(OperationInvocation sourceInvocation) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort() |
protected void |
checkAborted() |
<R extends Result,K extends Worker<R>> |
createWorkerWrapper(WorkerFactory<K> wrapped) |
protected abstract T |
execute() |
WorkerException |
getException() |
String |
getHumanReadableStatus() |
float |
getProgress() |
T |
getResult() |
OperationInvocation |
getSourceInvocation() |
WorkerStatus |
getStatus() |
void |
run() |
protected void |
updateProgress(float progress,
String humanReadableStatus) |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedpublic Worker(OperationInvocation sourceInvocation)
protected void updateProgress(float progress,
String humanReadableStatus)
protected abstract T execute() throws WorkerException, OperationAbortedException
public void abort()
protected final void checkAborted()
throws OperationAbortedException
OperationAbortedExceptionpublic float getProgress()
public String getHumanReadableStatus()
public WorkerException getException()
public T getResult()
public WorkerStatus getStatus()
public OperationInvocation getSourceInvocation()
public <R extends Result,K extends Worker<R>> WorkerWrapper<K,R> createWorkerWrapper(WorkerFactory<K> wrapped)
Copyright © 2016. All Rights Reserved.