com.bbn.openmap.util
Interface ISwingWorker<T>

All Known Implementing Classes:
PooledSwingWorker, SwingWorker

public interface ISwingWorker<T>

Interface that describes kinds of SwingWorkers that layers might want to use.

Author:
rshapiro

Method Summary
 T construct()
          Compute the value to be returned by the get method.
 void execute()
          For compatibility with old versions of SwingWorker, calls start().
 void finished()
          Called on the event dispatching thread (not on the worker thread) after the construct method has returned.
 T get()
          Return the value created by the construct method.
 void interrupt()
          A new method that interrupts the worker thread.
 boolean isInterrupted()
           
 void start()
          Start the worker thread.
 

Method Detail

construct

T construct()
Compute the value to be returned by the get method.

Returns:
the get method return

finished

void finished()
Called on the event dispatching thread (not on the worker thread) after the construct method has returned.


interrupt

void interrupt()
A new method that interrupts the worker thread. Call this method to force the worker to stop what it's doing.


isInterrupted

boolean isInterrupted()

get

T get()
Return the value created by the construct method. Returns null if either the constructing thread or the current thread was interrupted before a value was produced.

Returns:
the value created by the construct method

start

void start()
Start the worker thread.


execute

void execute()
For compatibility with old versions of SwingWorker, calls start().



Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details