dekoh.portal.syndication.aggregator.core
Class FeedFetcherCacheWrapper
java.lang.Object
dekoh.portal.syndication.aggregator.core.FeedFetcherCacheWrapper
- All Implemented Interfaces:
- com.sun.syndication.fetcher.impl.FeedFetcherCache
public class FeedFetcherCacheWrapper
- extends Object
- implements com.sun.syndication.fetcher.impl.FeedFetcherCache
FeedFetcherCacheWrapper is a wrapper over rome's FeedFetcherCache. This has additional utility methods to
retrieve a subscription item and to detect if the feed in this cache is modified.
- Since:
- Oct 24, 2007
|
Method Summary |
com.sun.syndication.fetcher.impl.SyndFeedInfo |
getFeedInfo(URL url)
|
boolean |
isCachedCopyOlder(com.sun.syndication.fetcher.impl.SyndFeedInfo synFeedInfo)
COmpares the cached feed with the supplied feed based on lastModifiedTime and Etag. |
boolean |
retrieve(SubscriptionItem subscriptionItem)
Retrievs the SyndFeed represented by the subscription item and updates the cache |
void |
setFeedInfo(URL url,
com.sun.syndication.fetcher.impl.SyndFeedInfo syndFeedInfo)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FeedFetcherCacheWrapper
public FeedFetcherCacheWrapper(com.sun.syndication.fetcher.impl.FeedFetcherCache feedFetcherCache)
getFeedInfo
public com.sun.syndication.fetcher.impl.SyndFeedInfo getFeedInfo(URL url)
- Specified by:
getFeedInfo in interface com.sun.syndication.fetcher.impl.FeedFetcherCache
setFeedInfo
public void setFeedInfo(URL url,
com.sun.syndication.fetcher.impl.SyndFeedInfo syndFeedInfo)
- Specified by:
setFeedInfo in interface com.sun.syndication.fetcher.impl.FeedFetcherCache
retrieve
public boolean retrieve(SubscriptionItem subscriptionItem)
throws com.sun.syndication.fetcher.FetcherException,
IOException,
FeedException
- Retrievs the
SyndFeed represented by the subscription item and updates the cache
- Parameters:
subscriptionItem - SubscriptionItem which will be downloaded
- Returns:
- true , if call to this method has modified the previously cached copy.
false, if the cached copy is not updated, this will happen when server hosting the feed sends 304
- Throws:
IOException
com.sun.syndication.fetcher.FetcherException
FeedException
isCachedCopyOlder
public boolean isCachedCopyOlder(com.sun.syndication.fetcher.impl.SyndFeedInfo synFeedInfo)
- COmpares the cached feed with the supplied feed based on lastModifiedTime and Etag. lastModifiedTime is given a priority over etag
- Parameters:
synFeedInfo -
- Returns:
- true, if the cached dies not have the supplied synFeedInfo or if cached feed copy is older than synFeedInfo
© 2009 Pramati Technologies - Dekoh - Portal for Developers