de.nava.informa.utils
Class FeedManagerEntry
java.lang.Object
de.nava.informa.utils.FeedManagerEntry
public class FeedManagerEntry
- extends Object
Holder class for feeds held in the manager. The purpose of this class is to
store the last time we loaded the feed, and determine if the feed needs to be
reread. Whilst we use the data provided by the feed where possible, if this
is not present defaults will be used.
Its also important to note that we do oversimply things a bit. We ignore the
updateBase even if specified by the feed.
- Author:
- Sam Newman
- See Also:
FeedManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MILLISECONDS_IN_HOUR
public static final long MILLISECONDS_IN_HOUR
- See Also:
- Constant Field Values
MILLISECONDS_IN_DAY
public static final long MILLISECONDS_IN_DAY
- See Also:
- Constant Field Values
MILLISECONDS_IN_MONTH
public static final long MILLISECONDS_IN_MONTH
- See Also:
- Constant Field Values
MILLISECONDS_IN_YEAR
public static final long MILLISECONDS_IN_YEAR
- Over simplificatin here - assuming a non-leap year
- See Also:
- Constant Field Values
FeedManagerEntry
public FeedManagerEntry(String feedUri,
ChannelBuilderIF builder,
ChannelUpdatePeriod defaultUpdatePeriod2,
int defaultUpdateFrequency)
throws FeedManagerException
- Creates a new FeedManagerEntry object.
- Parameters:
feedUri
- builder
- defaultUpdatePeriod2
- defaultUpdateFrequency
-
- Throws:
FeedManagerException
getDefaultUpdatePeriod
public ChannelUpdatePeriod getDefaultUpdatePeriod()
setDefaultUpdatePeriod
public void setDefaultUpdatePeriod(ChannelUpdatePeriod defaultUpdatePeriod)
getDefaultUpdateFrequency
public int getDefaultUpdateFrequency()
setDefaultUpdateFrequency
public void setDefaultUpdateFrequency(int defaultUpdateFrequency)
getFeed
public FeedIF getFeed()
throws FeedManagerException
- Checks to see if the feed is out of date - if it is the feed is reloaded
from the URI, otherwise the cached version is returned.
- Returns:
- The up todate feed
- Throws:
FeedManagerException
setWantedTtl
public void setWantedTtl(long ms)
Copyright © 2002-2007 Niko Schmuck.
All Rights Reserved.