@Deprecated
public interface FeedFetcher
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_USER_AGENT
Deprecated.
The default user agent.
|
Modifier and Type | Method and Description |
---|---|
void |
addFetcherEventListener(FetcherListener listener)
Deprecated.
Add a FetcherListener.
|
java.lang.String |
getUserAgent()
Deprecated.
|
boolean |
isUsingDeltaEncoding()
Deprecated.
Is this fetcher using rfc3229 delta encoding?
|
void |
removeFetcherEventListener(FetcherListener listener)
Deprecated.
Remove a FetcherListener
|
SyndFeed |
retrieveFeed(java.lang.String userAgent,
java.net.URL url)
Deprecated.
|
SyndFeed |
retrieveFeed(java.net.URL feedUrl)
Deprecated.
Retrieve a feed over HTTP
|
void |
setAllowDoctypes(boolean allowDoctypes)
Deprecated.
In ROME 1.5.1 we fixed a security vulnerability by disallowing Doctype declarations by default.
|
void |
setPreserveWireFeed(boolean preserveWireFeed)
Deprecated.
If set to true, the WireFeed will be made accessible from the SyndFeed object returned from
the Fetcher via the originalWireFeed() method.
|
void |
setUserAgent(java.lang.String string)
Deprecated.
|
void |
setUsingDeltaEncoding(boolean useDeltaEncoding)
Deprecated.
Turn on or off rfc3229 delta encoding
|
static final java.lang.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(java.lang.String string)
string
- The User-Agent to sent to serversjava.lang.String 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 removeSyndFeed retrieveFeed(java.net.URL feedUrl) throws java.lang.IllegalArgumentException, java.io.IOException, FeedException, FetcherException
feedUrl
- A non-null URL of a RSS/Atom feed to retrieveSyndFeed
objectjava.lang.IllegalArgumentException
- if the URL is null;java.io.IOException
- if a TCP error occursFeedException
- if the feed is not validFetcherException
- if a HTTP error occurredSyndFeed retrieveFeed(java.lang.String userAgent, java.net.URL url) throws java.lang.IllegalArgumentException, java.io.IOException, FeedException, FetcherException
java.lang.IllegalArgumentException
java.io.IOException
FeedException
FetcherException
void setPreserveWireFeed(boolean preserveWireFeed)
void setAllowDoctypes(boolean allowDoctypes)
allowDoctypes
- true when Doctype declarations should be allowed again, false otherwise