|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.nava.informa.utils.FeedManager
public class FeedManager
A class used to manage feeds. Feeds are parsed and stored using the
addFeed
method. Subsequent requests for the same feed URI
(using either addFeed
or getFeed
) will return
a cached copy, unless the feed is due to be refreshed direct from the source.
The time before a feed is considered out of date will be read from the feed
if possible, failing that a default UpdatePeriod and UpdateFrequency are
used.
Constructor Summary | |
---|---|
FeedManager()
Creates a new FeedManager object. |
|
FeedManager(ChannelUpdatePeriod defaultUpdatePeriod,
int defaultUpdateFrequency)
Creates a new FeedManager object. |
Method Summary | |
---|---|
FeedIF |
addFeed(FeedIF feed)
Loads a feed given the metadata information contained in the given FeedIF object |
FeedIF |
addFeed(FeedIF feed,
int ttl)
Loads a feed given the metadata information contained in the given FeedIF object |
FeedIF |
addFeed(String feedUri)
Adds the specified feed to the manager. |
FeedIF |
addFeed(String feedUri,
int wantedTtlmins)
Adds the specified feed to the manager with a specific Ttl. |
Collection<FeedIF> |
addFeeds(String opmlFeedUri)
Attempts to load the feeds specified in the given OPML file into the manager |
Collection<FeedIF> |
addFeeds(String opmlFeedUri,
int ttl)
Attempts to load the feeds specified in the given OPML file into the manager |
ChannelBuilderIF |
getChannelBuilder()
Gets the channel builder used by the feed entries. |
FeedIF |
getFeed(String feedUri)
Retrieves the feed being managed. |
boolean |
hasFeed(String feedUri)
Determines if the manager is handling the feed |
void |
removeFeed(String feedUri)
Removes the specified feed from the manager |
void |
setChannelBuilder(ChannelBuilderIF chBuilder)
Sets the channel builder used when reading the news feeds. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeedManager()
public FeedManager(ChannelUpdatePeriod defaultUpdatePeriod, int defaultUpdateFrequency)
defaultUpdatePeriod
- defaultUpdateFrequency
- Method Detail |
---|
public FeedIF addFeed(FeedIF feed) throws FeedManagerException
feed
-
FeedManagerException
- DOCUMENT ME!public FeedIF addFeed(FeedIF feed, int ttl) throws FeedManagerException
feed
- ttl
- in minutes
FeedManagerException
- DOCUMENT ME!public Collection<FeedIF> addFeeds(String opmlFeedUri) throws FeedManagerException
opmlFeedUri
- An OPML file containing a list of feeds
FeedManagerException
- DOCUMENT ME!public Collection<FeedIF> addFeeds(String opmlFeedUri, int ttl) throws FeedManagerException
opmlFeedUri
- An OPML file containing a list of feedsttl
- a ttl for all feeds (in minutes)
FeedManagerException
- DOCUMENT ME!public void setChannelBuilder(ChannelBuilderIF chBuilder)
chBuilder
- public ChannelBuilderIF getChannelBuilder()
public boolean hasFeed(String feedUri)
feedUri
- The URI for the feed
public FeedIF addFeed(String feedUri) throws FeedManagerException
feedUri
- The URI of the feed to add
FeedManagerException
- If the feed specified is invalidpublic FeedIF addFeed(String feedUri, int wantedTtlmins) throws FeedManagerException
updatePeriod
and updateFrequency
), depending
on the feed type. This behavior is implemented in the differents
CacheSettingsIF
implementations provided.
feedUri
- The URI of the feed to addwantedTtlmins
- The ttl wanted for this feed (in minutes)
FeedManagerException
- If the feed specified is invalidCacheSettingsIF
public void removeFeed(String feedUri)
feedUri
- The URI for the feed to removepublic FeedIF getFeed(String feedUri) throws FeedManagerException
addFeed
instead.
feedUri
- The feed to return
FeedManagerException
- If the feed specified is invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |