net.sourceforge.rssowl.controller.thread
Class FeedQueueLoader

java.lang.Object
  extended by java.lang.Thread
      extended by net.sourceforge.rssowl.controller.thread.FeedQueueLoader
All Implemented Interfaces:
java.lang.Runnable

public class FeedQueueLoader
extends java.lang.Thread

The RSS queue loader is a thread that loads feed from a Vector. The feeds are loaded feed by feed beginning with the first element of the vector.

Version:
1.2.4
Author:
Benjamin Pasero

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
(package private)  int counter
           
private  java.util.Vector feedQueue
           
private static int GAP_BETWEEN_LOADING
          Miliseconds to wait before loading the next chunk of Feeds
private  boolean isRunning
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FeedQueueLoader()
          Instantiate a new FeedQueueLoader Thread
 
Method Summary
 void addFeed(java.lang.String url)
          Add a feed to the queue
(package private)  java.lang.String getLastFeed()
          Get the last feed to load
(package private)  java.lang.String getNextFeed()
          Get the next feed to load
 boolean isRunning()
          Check wether this Thread is currently running.
 void run()
           
 void startThread()
          Start the RSS Queue loader Thread
 void stopThread()
          Stop the RSS Queue loader Thread
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

feedQueue

private java.util.Vector feedQueue

counter

int counter

isRunning

private boolean isRunning

GAP_BETWEEN_LOADING

private static final int GAP_BETWEEN_LOADING
Miliseconds to wait before loading the next chunk of Feeds

See Also:
Constant Field Values
Constructor Detail

FeedQueueLoader

public FeedQueueLoader()
Instantiate a new FeedQueueLoader Thread

Method Detail

addFeed

public void addFeed(java.lang.String url)
Add a feed to the queue

Parameters:
url - URL of the feed

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Thread.run()

startThread

public void startThread()
Start the RSS Queue loader Thread


stopThread

public void stopThread()
Stop the RSS Queue loader Thread


getLastFeed

java.lang.String getLastFeed()
Get the last feed to load

Returns:
String URL of the last feed

getNextFeed

java.lang.String getNextFeed()
Get the next feed to load

Returns:
String URL of the next feed

isRunning

public boolean isRunning()
Check wether this Thread is currently running.

Returns:
boolean TRUE if this Thread is currently running, FALSE otherwise.


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo