net.sourceforge.rssowl.controller.thread
Class AggregationLoader

java.lang.Object
  extended bynet.sourceforge.rssowl.controller.thread.AggregationLoader

public class AggregationLoader
extends Object

Load multiple RSSChannels from a TreeSet holding the favorites titles. Display the aggregated RSSChannels in one tab.

Version:
1.1.3
Author:
Benjamin Pasero

Field Summary
(package private)  Category aggregatedCategory
          The category that is aggregated
(package private)  Channel aggregatedRSSChannel
          Aggregated category channel
(package private)  TreeSet favorites
          List of favorites to aggregate
(package private)  boolean generateUniqueTitles
          Set this flag to true, if the newstitles have to be unique
(package private)  Vector innerFeedLoadThreads
          Collection of all inner feed load Threads
(package private)  boolean isReload
          Set this flag to true, if the Multi loader performs a reload
(package private)  ExtendedThread outerNewsFeedLoader
          Thread to load the aggregated category
private  boolean performSearch
          If a search is performed, set to TRUE
(package private)  Vector rssChannels
          List of RSS channels
(package private)  GUI rssOwlGui
          The MainController
(package private)  int runningThreadCounter
          Count the number of inner feed loader Threads
private  String searchPattern
          Search pattern
(package private)  int style
          Style of the operation (load, reload, search)
(package private)  String title
          Title of the aggregated category
private static int WAIT_CYCLE
          Wait state in ms for the outer feed loader to check the inner feed loader Threads if they have already finished
 
Constructor Summary
AggregationLoader(TreeSet favorites, Category aggregatedCategory, GUI rssOwlGui, String title)
          Instantiate a new AggregationLoader
AggregationLoader(TreeSet favorites, Category aggregatedCategory, GUI rssOwlGui, String title, String searchPattern)
          Instantiate a new AggregationLoader
 
Method Summary
(package private)  void createAggregatedRSSChannel()
          Aggregate the rsschannels to one channel
(package private)  void createErrorChannel(String url, NewsfeedFactoryException e)
          Create an warning channel to display an erroneous RSS feed
(package private)  ExtendedThread createInnerFeedLoader(String url)
          Create the inner feed loader that is called from the outer feed loader for each URL to load.
private  void createOuterFeedLoader(boolean displayNewsFeed)
          Create the favorites multi load thread
(package private)  void displayRSSChannels()
          Display the rsschannels in one tab
(package private)  boolean isLoadingDone()
          Checks if the loading of this aggregation is done or not
 void loadFavorites(boolean displayNewsFeed)
          Load all favorites in a Thread
 void setReload(boolean isReload)
          Set to TRUE if all feeds of the aggregated category should get uncached before loaded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WAIT_CYCLE

private static final int WAIT_CYCLE
Wait state in ms for the outer feed loader to check the inner feed loader Threads if they have already finished

See Also:
Constant Field Values

performSearch

private boolean performSearch
If a search is performed, set to TRUE


searchPattern

private String searchPattern
Search pattern


aggregatedCategory

Category aggregatedCategory
The category that is aggregated


aggregatedRSSChannel

Channel aggregatedRSSChannel
Aggregated category channel


favorites

TreeSet favorites
List of favorites to aggregate


generateUniqueTitles

boolean generateUniqueTitles
Set this flag to true, if the newstitles have to be unique


innerFeedLoadThreads

Vector innerFeedLoadThreads
Collection of all inner feed load Threads


isReload

boolean isReload
Set this flag to true, if the Multi loader performs a reload


outerNewsFeedLoader

ExtendedThread outerNewsFeedLoader
Thread to load the aggregated category


rssChannels

Vector rssChannels
List of RSS channels


rssOwlGui

GUI rssOwlGui
The MainController


runningThreadCounter

int runningThreadCounter
Count the number of inner feed loader Threads


style

int style
Style of the operation (load, reload, search)


title

String title
Title of the aggregated category

Constructor Detail

AggregationLoader

public AggregationLoader(TreeSet favorites,
                         Category aggregatedCategory,
                         GUI rssOwlGui,
                         String title)
Instantiate a new AggregationLoader

Parameters:
favorites - Vector with the URLs
aggregatedCategory - The category that is aggregated
rssOwlGui - The RSSOwl Maincontroller
title - Title of the aggregated Channel

AggregationLoader

public AggregationLoader(TreeSet favorites,
                         Category aggregatedCategory,
                         GUI rssOwlGui,
                         String title,
                         String searchPattern)
Instantiate a new AggregationLoader

Parameters:
favorites - Vector with the URLs
aggregatedCategory - The category that is aggregated
rssOwlGui - The RSSOwl Maincontroller
title - Title of the aggregated Channel
searchPattern - The pattern to search for
Method Detail

loadFavorites

public void loadFavorites(boolean displayNewsFeed)
Load all favorites in a Thread

Parameters:
displayNewsFeed - TRUE if newsfeed should be displayed

setReload

public void setReload(boolean isReload)
Set to TRUE if all feeds of the aggregated category should get uncached before loaded.

Parameters:
isReload - If Reload, set to TRUE

createOuterFeedLoader

private void createOuterFeedLoader(boolean displayNewsFeed)
Create the favorites multi load thread

Parameters:
displayNewsFeed - TRUE if newsfeed should be displayed

createAggregatedRSSChannel

void createAggregatedRSSChannel()
Aggregate the rsschannels to one channel


createErrorChannel

void createErrorChannel(String url,
                        NewsfeedFactoryException e)
Create an warning channel to display an erroneous RSS feed

Parameters:
url - The url of the feed
e - The factory exception that occured

createInnerFeedLoader

ExtendedThread createInnerFeedLoader(String url)
Create the inner feed loader that is called from the outer feed loader for each URL to load.

Parameters:
url - The url of the feed to load
Returns:
Thread The inner feed loader

displayRSSChannels

void displayRSSChannels()
Display the rsschannels in one tab


isLoadingDone

boolean isLoadingDone()
Checks if the loading of this aggregation is done or not

Returns:
boolean TRUE if the loading is done


RSSOwl - RSS / RDF / Atom Newsreader

SourceForge.net Logo