rss.utilities
Class RSSUpdater

java.lang.Object
  extended by rss.utilities.RSSUpdater

public class RSSUpdater
extends java.lang.Object

Contains static methods used to update Feed objects with new FeedItems from the feed's originating source. Keep in mind that using the RSSUpdater usually implies there is a connection to the Internet.

Author:
Karl E. Rieb

Constructor Summary
RSSUpdater()
           
 
Method Summary
static void update(java.util.Collection<Feed> feeds, DataSource source)
          Calling this method will force the RSSUpdater to update all specified feeds using the given DataSource.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSSUpdater

public RSSUpdater()
Method Detail

update

public static void update(java.util.Collection<Feed> feeds,
                          DataSource source)
                   throws UnsupportedRSSFormatException,
                          java.io.IOException
Calling this method will force the RSSUpdater to update all specified feeds using the given DataSource. NOTE: The RSSUpdater updates the feeds sequentially, so if one feed takes a long time to update, feeds after it will remain unparsed for an unspecified amount of time. Do not make calls expecting updating to be immediate. To be notified of completed update of a feed, listen to the given DataSource for a DataEvent.

Parameters:
feeds - Feeds to update
source - DataSouce to use for storing updated information
Throws:
UnsupportedRSSFormatException - Thrown if the RSS file is unsupported by the parser
java.io.IOException - Thrown if unable to connect to the Feed URL (usually indicates a bad URL or no connection to the Internet).