| java.lang.Object org.clapper.curn.plugins.GzipDownloadPlugIn
GzipDownloadPlugIn | public class GzipDownloadPlugIn implements MainConfigItemPlugIn,FeedConfigItemPlugIn,PreFeedDownloadPlugIn(Code) | | The GzipDownloadPlugIn handles setting the global and
per-feed HTTP header that requests gzipped (compressed) feed data
(assuming the remote server honors that header). It intercepts the
following configuration parameters:
Section |
Parameter |
Meaning |
[curn] |
GzipDownload |
The global default setting, if none is supplied in individual feed
sections. Defaults to true. |
[Feedxxx] |
GzipDownload |
Whether or not to ask for gzipped data for a particular feed.
Defaults to the global setting if not specified. |
version: $Revision: 7041 $ |
GzipDownloadPlugIn | public GzipDownloadPlugIn()(Code) | | Default constructor (required).
|
getPlugInName | public String getPlugInName()(Code) | | Get a displayable name for the plug-in.
the name |
getPlugInSortKey | public String getPlugInSortKey()(Code) | | Get the sort key for this plug-in.
the sort key string. |
initPlugIn | public void initPlugIn() throws CurnException(Code) | | Initialize the plug-in. This method is called before any of the
plug-in methods are called.
throws: CurnException - on error |
runFeedConfigItemPlugIn | public boolean runFeedConfigItemPlugIn(String sectionName, String paramName, CurnConfig config, FeedInfo feedInfo) throws CurnException(Code) | | Called immediately after curn has read and processed a
configuration item in a "feed" configuration section. All
configuration items are passed, one by one, to each loaded plug-in.
If a plug-in class is not interested in a particular configuration
item, this method should simply return without doing anything. Note
that some configuration items may simply be variable assignment;
there's no real way to distinguish a variable assignment from a
blessed configuration item.
Parameters: sectionName - the name of the configuration section wherethe item was found Parameters: paramName - the name of the parameter Parameters: config - the active configuration Parameters: feedInfo - partially complete FeedInfo objectfor the feed. The URL is guaranteed to bepresent, but no other fields are. true to continue processing the feed,false to skip it throws: CurnException - on error See Also: CurnConfig See Also: FeedInfo See Also: FeedInfo.getURL |
runMainConfigItemPlugIn | public void runMainConfigItemPlugIn(String sectionName, String paramName, CurnConfig config) throws CurnException(Code) | | Called immediately after curn has read and processed a
configuration item in the main [curn] configuration section. All
configuration items are passed, one by one, to each loaded plug-in.
If a plug-in class is not interested in a particular configuration
item, this method should simply return without doing anything. Note
that some configuration items may simply be variable assignment;
there's no real way to distinguish a variable assignment from a
blessed configuration item.
Parameters: sectionName - the name of the configuration section wherethe item was found Parameters: paramName - the name of the parameter Parameters: config - the CurnConfig object throws: CurnException - on error See Also: CurnConfig |
runPreFeedDownloadPlugIn | public boolean runPreFeedDownloadPlugIn(FeedInfo feedInfo, URLConnection urlConn) throws CurnException(Code) | | Called just before a feed is downloaded. This method can return
false to signal curn that the feed should be
skipped. The plug-in method can also set values on the
URLConnection used to download the plug-in, via
URL.setRequestProperty(). (Note that all URLs, even
file: URLs, are passed into this method. Setting a request
property on the URLConnection object for a file:
URL will have no effect--though it isn't specifically harmful.)
Possible uses for a pre-feed download plug-in include:
- filtering on feed URL to prevent downloading non-matching feeds
- changing the default User-Agent value
- setting a non-standard HTTP header field
Parameters: feedInfo - the FeedInfo object for the feed to bedownloaded Parameters: urlConn - the java.net.URLConnection object that willbe used to download the feed's XML. true if curn should continue to process thefeed, false to skip the feed throws: CurnException - on error See Also: FeedInfo |
|
|