edu.princeton.wordnet.browser
Class Worker<T>

java.lang.Object
  extended by javax.swing.SwingWorker<T,java.lang.Void>
      extended by edu.princeton.wordnet.browser.Worker<T>
Type Parameters:
T - type of returned object
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<T>, java.util.concurrent.RunnableFuture<T>

public class Worker<T>
extends javax.swing.SwingWorker<T,java.lang.Void>

Worker thread

Author:
Bernard Bou

Nested Class Summary
(package private) static interface Worker.Task<T>
          Task interface with ody and task termination event hook
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
javax.swing.SwingWorker.StateValue
 
Field Summary
private static org.apache.log4j.Logger LOG
          Logger
private  Worker.Task<T> theTask
          Task task
 
Constructor Summary
Worker(Worker.Task<T> thisTask)
          Constructor
 
Method Summary
 T doInBackground()
           
protected  void done()
           
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG
Logger


theTask

private final Worker.Task<T> theTask
Task task

Constructor Detail

Worker

Worker(Worker.Task<T> thisTask)
Constructor

Parameters:
thisTask - task
Method Detail

doInBackground

public T doInBackground()
Specified by:
doInBackground in class javax.swing.SwingWorker<T,java.lang.Void>

done

protected void done()
Overrides:
done in class javax.swing.SwingWorker<T,java.lang.Void>