org.bsf.remoteIterator.client.tableModel
Class BackgroundLoadingThread

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.bsf.remoteIterator.client.tableModel.BackgroundLoadingThread
All Implemented Interfaces:
java.lang.Runnable

public class BackgroundLoadingThread
extends java.lang.Thread

A thread to load the data in the background, using a RemoteIteratorClient.

See Also:
DefaultRemoteIteratorTableModel

Field Summary
private  DefaultRemoteIteratorTableModel _defaultRemoteIteratorTableModel
           
private static java.util.Vector _instantiatedThreads
           
private  boolean _isFirstCall
           
private  RemoteIteratorClient _remoteIteratorClient
           
private  boolean _shouldStop
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
BackgroundLoadingThread(RemoteIteratorClient p_remoteIteratorClient, DefaultRemoteIteratorTableModel p_tableModel)
          Instantiates a Thread that will, using the provided RemoteIteratorClient, retrieve the data and insert it in the given DefaultRemoteIteratorTableModel.
 
Method Summary
static void removeAllRemainingRemoteIterator()
          This method is called by the model when the static cleanUp method is called to prevent phantom RIs (application exited with sleeping threads...).
 void removeRemoteIterator()
           
 void run()
           
 void stopLoading()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_instantiatedThreads

private static java.util.Vector _instantiatedThreads

_remoteIteratorClient

private RemoteIteratorClient _remoteIteratorClient

_defaultRemoteIteratorTableModel

private DefaultRemoteIteratorTableModel _defaultRemoteIteratorTableModel

_shouldStop

private boolean _shouldStop

_isFirstCall

private boolean _isFirstCall
Constructor Detail

BackgroundLoadingThread

public BackgroundLoadingThread(RemoteIteratorClient p_remoteIteratorClient,
                               DefaultRemoteIteratorTableModel p_tableModel)
Instantiates a Thread that will, using the provided RemoteIteratorClient, retrieve the data and insert it in the given DefaultRemoteIteratorTableModel.

Parameters:
p_remoteIteratorClient - The RIClient to use to retrieve the data.
p_tableModel - The DefaultRemoteIteratorTableModel in which the data will be inserted as they arrived.
Method Detail

run

public void run()

stopLoading

public void stopLoading()

removeRemoteIterator

public void removeRemoteIterator()

removeAllRemainingRemoteIterator

public static void removeAllRemainingRemoteIterator()
This method is called by the model when the static cleanUp method is called to prevent phantom RIs (application exited with sleeping threads...).