java.net: Wiki

The Source for Java Technology Collaboration


 <<O>>  Difference Topic RomeTutorialFeedFetcher (2 - 18 Jun 2004 - Main.nicklothian)
Line: 1 to 1
 
META TOPICPARENT name="Rome02Tutorials"
Changed:
<
<

Rome Tutorial, Using the Rome Fetcher to retrieve syndication feeds

The Rome Fetcher (see modules/fetcher) allows the retrieval of feeds via HTTP. It supports HTTP conditional gets (ie: last modified and ETag handling) and GZip encoded feeds. It should enable user to write aggregators that follow the Atom aggregator behaviour recommendations

The FeedFetcher class does the actual HTTP request. It relies on the FeedInfoCacheI interface which stores information about each feed required for conditional gets. Currently there is a single implementation of FeedInfoCacheI supplied: HashMapFeedInfoCache.

The basic usage of FeedFetcher is as follows:

FeedInfoCacheI feedInfoCache = HashMapFeedInfoCache.getInstance();
SyndFeedI feed = new FeedFetcher(feedInfoCache).retrieveFeed(new URL("http://blogs.sun.com/roller/rss/pat"));
System.out.println(feed);

Any subsequent fetches of http://blogs.sun.com/roller/rss/pat by any FeedFetcher using feedInfoCache will now only retrieve the feed if it has changed.

FeedFetcher can be used without a cache if required. Simply create it using the zero-parameter constructor:

FeedFetcher feedFetcher = new FeedFetcher();

>
>
Moved to The Rome Fetcher Tutorial

 <<O>>  Difference Topic RomeTutorialFeedFetcher (1 - 18 Jun 2004 - Main.nicklothian2)
Line: 1 to 1
Added:
>
>
META TOPICPARENT name="Rome02Tutorials"

Rome Tutorial, Using the Rome Fetcher to retrieve syndication feeds

The Rome Fetcher (see modules/fetcher) allows the retrieval of feeds via HTTP. It supports HTTP conditional gets (ie: last modified and ETag handling) and GZip encoded feeds. It should enable user to write aggregators that follow the Atom aggregator behaviour recommendations

The FeedFetcher class does the actual HTTP request. It relies on the FeedInfoCacheI interface which stores information about each feed required for conditional gets. Currently there is a single implementation of FeedInfoCacheI supplied: HashMapFeedInfoCache.

The basic usage of FeedFetcher is as follows:

FeedInfoCacheI feedInfoCache = HashMapFeedInfoCache.getInstance();
SyndFeedI feed = new FeedFetcher(feedInfoCache).retrieveFeed(new URL("http://blogs.sun.com/roller/rss/pat"));
System.out.println(feed);

Any subsequent fetches of http://blogs.sun.com/roller/rss/pat by any FeedFetcher using feedInfoCache will now only retrieve the feed if it has changed.

FeedFetcher can be used without a cache if required. Simply create it using the zero-parameter constructor:

FeedFetcher feedFetcher = new FeedFetcher();


Topic RomeTutorialFeedFetcher . { View | Diffs r2 < r1 | More }
 XML java.net RSS