Package offlineProcessing
Class OfflineTaskGroup.TaskGroupWorker
- All Implemented Interfaces:
 Runnable,Future<Integer>,RunnableFuture<Integer>,ViewLoadObserver
- Enclosing class:
 OfflineTaskGroup
public class OfflineTaskGroup.TaskGroupWorker
extends SwingWorker<Integer,TaskMonitorData>
implements ViewLoadObserver 
Swing worker to do the actual work.
- Author:
 - Doug Gillespie
 
- 
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValueNested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanAsk the load observer if loading should be stopped.protected Integerprotected voiddone()booleanCheck whether the thread has been stopped.voidprotected voidprocess(List<TaskMonitorData> chunks) voidpublish(TaskMonitorData tmd) voidsayProgress(int state, long loadStart, long loadEnd, long lastTime, int nLoaded) Report progress back to the load observerMethods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state 
- 
Constructor Details
- 
TaskGroupWorker
public TaskGroupWorker() 
 - 
 - 
Method Details
- 
killWorker
public void killWorker() - 
isInstantKill
public boolean isInstantKill()Check whether the thread has been stopped.- Returns:
 - true if the thread has been stopped.
 
 - 
doInBackground
- Specified by:
 doInBackgroundin classSwingWorker<Integer,TaskMonitorData> 
 - 
publish
 - 
done
protected void done()- Overrides:
 donein classSwingWorker<Integer,TaskMonitorData> 
 - 
process
- Overrides:
 processin classSwingWorker<Integer,TaskMonitorData> 
 - 
sayProgress
public void sayProgress(int state, long loadStart, long loadEnd, long lastTime, int nLoaded) Description copied from interface:ViewLoadObserverReport progress back to the load observer- Specified by:
 sayProgressin interfaceViewLoadObserver- Parameters:
 state- LoadQueueProgressData.STATE_LINKINGSUBTABLE, STATE_LOADING or STATE_DONEloadStart-loadEnd-lastTime-nLoaded-- See Also:
 
 - 
cancelLoad
public boolean cancelLoad()Description copied from interface:ViewLoadObserverAsk the load observer if loading should be stopped.- Specified by:
 cancelLoadin interfaceViewLoadObserver- Returns:
 
 
 -