public interface FeedFetcher
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_USER_AGENT
The default user agent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFetcherEventListener(FetcherListener listener)
Add a FetcherListener.
|
String |
getUserAgent() |
boolean |
isUsingDeltaEncoding()
Is this fetcher using rfc3229 delta encoding?
|
void |
removeFetcherEventListener(FetcherListener listener)
Remove a FetcherListener
|
com.rometools.rome.feed.synd.SyndFeed |
retrieveFeed(String userAgent,
URL url) |
com.rometools.rome.feed.synd.SyndFeed |
retrieveFeed(URL feedUrl)
Retrieve a feed over HTTP
|
void |
setPreserveWireFeed(boolean preserveWireFeed)
If set to true, the WireFeed will be made accessible from the SyndFeed object returned from
the Fetcher via the originalWireFeed() method.
|
void |
setUserAgent(String string) |
void |
setUsingDeltaEncoding(boolean useDeltaEncoding)
Turn on or off rfc3229 delta encoding
|
static final String DEFAULT_USER_AGENT
The default user agent. It is not marked final so buggy java compiler will not write this string into all classes that reference it.
http://tinyurl.com/64t5n points to https://rome.dev.java.net Some servers ban user agents with "Java" in the name.
void setUserAgent(String string)
string - The User-Agent to sent to serversString getUserAgent()
void setUsingDeltaEncoding(boolean useDeltaEncoding)
Turn on or off rfc3229 delta encoding
See http://www.ietf.org/rfc/rfc3229.txt and http://bobwyman.pubsub.com/main/2004/09/using_rfc3229_w.html
NOTE: This is experimental and feedback is welcome!
useDeltaEncoding - boolean isUsingDeltaEncoding()
Is this fetcher using rfc3229 delta encoding?
void addFetcherEventListener(FetcherListener listener)
Add a FetcherListener.
The FetcherListener will receive an FetcherEvent when a Fetcher event (feed polled, retrieved, etc) occurs
listener - The FetcherListener to recieve the eventvoid removeFetcherEventListener(FetcherListener listener)
Remove a FetcherListener
listener - The FetcherListener to removecom.rometools.rome.feed.synd.SyndFeed retrieveFeed(URL feedUrl) throws IllegalArgumentException, IOException, com.rometools.rome.io.FeedException, FetcherException
feedUrl - A non-null URL of a RSS/Atom feed to retrieveSyndFeed objectIllegalArgumentException - if the URL is null;IOException - if a TCP error occurscom.rometools.rome.io.FeedException - if the feed is not validFetcherException - if a HTTP error occurredcom.rometools.rome.feed.synd.SyndFeed retrieveFeed(String userAgent, URL url) throws IllegalArgumentException, IOException, com.rometools.rome.io.FeedException, FetcherException
IllegalArgumentExceptionIOExceptioncom.rometools.rome.io.FeedExceptionFetcherExceptionvoid setPreserveWireFeed(boolean preserveWireFeed)
Copyright © 2015. All Rights Reserved.