public class CurnConfig extends Configuration (Code)
CurnConfig uses the Configuration class (part of
the clapper.org Java Utility library) to parse and validate the
curn configuration file, holding the results in memory for easy
access.
getOutputHandlers() Gets the list of output handlers from the configuration, in the order
they appeared in the configuration.
an unmodifiable Collection ofConfiguredOutputHandler objects.
Construct an CurnConfig object. You must call one of the
CurnConfig.load(File) methods to load the configuration.
Parameters: err - where to write errors
Utility method that retrieves a "deprecated parameter" warning.
Parameters: badParam - the deprecated parameter Parameters: goodParam - the parameter that should be used, or null for none the message
Get the configured RSS feeds. The feeds are returned in the order
they were specified in the configuration file.
a Collection of FeedInfo objects. See Also:CurnConfig.hasFeed See Also:CurnConfig.getFeedInfoMap
Gets the list of output handlers from the configuration, in the order
they appeared in the configuration.
an unmodifiable Collection ofConfiguredOutputHandler objects. The collection willbe empty, but never null, if no output handlers were configured.
Get the name of the RSS parser class to use. The caller is responsible
for loading the returned class name and verifying that it implements
the appropriate interface(s).
the full class name
Determine whether the specified URL is one of the configured RSS
feeds.
Parameters: url - the URL true if it's there, false if not See Also:CurnConfig.getFeeds See Also:CurnConfig.getFeedInfoMap()
Load configuration from a path. Any existing data is discarded.
Parameters: path - the path throws: IOException - read error throws: ConfigurationException - parse error
Load configuration from an open InputStream.
Any existing data is discarded.
Parameters: iStream - open input stream throws: IOException - read error throws: ConfigurationException - parse error
Load configuration from a URL. Any existing data is discarded.
Parameters: url - the URL throws: IOException - read error throws: ConfigurationException - parse error
Load configuration from a file. Any existing data is discarded.
Parameters: file - the file throws: IOException - read error throws: ConfigurationException - parse error
Determine whether the cache should be updated.
true if the cache should be updated, falseif it should not. See Also:CurnConfig.setMustUpdateFeedMetadata
setMaxThreads
public void setMaxThreads(int newValue) throws ConfigurationException(Code)
Set the maximum number of concurrent threads to spawn when retrieving
RSS feeds.
Parameters: newValue - the maximum number of threads throws: ConfigurationException - bad value See Also:CurnConfig.getMaxThreads
setMustUpdateFeedMetadata
public void setMustUpdateFeedMetadata(boolean val)(Code)
Change the "update cache" flag.
Parameters: val - true if the cache should be updated, falseif it should not See Also:CurnConfig.mustUpdateFeedMetadata
setShowRSSVersionFlag
public void setShowRSSVersionFlag(boolean val)(Code)
Set the value of the "show RSS version" flag.
Parameters: val - true to set the flag,false to clear it See Also:CurnConfig.showRSSVersion