@Deprecated public abstract class AbstractFeedFetcher extends Object implements FeedFetcher
DEFAULT_USER_AGENT
Constructor and Description |
---|
AbstractFeedFetcher()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addFetcherEventListener(FetcherListener listener)
Deprecated.
Add a FetcherListener.
|
static SyndFeed |
combineFeeds(SyndFeed originalFeed,
SyndFeed newFeed)
Deprecated.
Combine the entries in two feeds into a single feed.
|
protected void |
fireEvent(String eventType,
String urlStr)
Deprecated.
|
protected void |
fireEvent(String eventType,
String urlStr,
SyndFeed feed)
Deprecated.
|
protected void |
fireEvent(String eventType,
URLConnection connection)
Deprecated.
|
protected void |
fireEvent(String eventType,
URLConnection connection,
SyndFeed feed)
Deprecated.
|
String |
getUserAgent()
Deprecated.
|
protected void |
handleErrorCodes(int responseCode)
Deprecated.
Handles HTTP error codes.
|
boolean |
isAllowDoctypes()
Deprecated.
|
boolean |
isPreserveWireFeed()
Deprecated.
|
boolean |
isUsingDeltaEncoding()
Deprecated.
Is this fetcher using rfc3229 delta encoding?
|
void |
removeFetcherEventListener(FetcherListener listener)
Deprecated.
Remove a FetcherListener
|
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(String string)
Deprecated.
|
void |
setUsingDeltaEncoding(boolean useDeltaEncoding)
Deprecated.
Turn on or off rfc3229 delta encoding
|
protected void |
throw4XXError(int responseCode)
Deprecated.
|
protected void |
throwAuthenticationError(int responseCode)
Deprecated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
retrieveFeed, retrieveFeed
public String getUserAgent()
getUserAgent
in interface FeedFetcher
public void setUserAgent(String string)
setUserAgent
in interface FeedFetcher
string
- The User-Agent to sent to serversprotected void fireEvent(String eventType, URLConnection connection)
eventType
- The event type to fireconnection
- the current connectionprotected void fireEvent(String eventType, URLConnection connection, SyndFeed feed)
eventType
- The event type to fireconnection
- the current connectionfeed
- The feed to pass to the eventprotected void fireEvent(String eventType, String urlStr)
eventType
- The event type to fireurlStr
- the current url as a stringprotected void fireEvent(String eventType, String urlStr, SyndFeed feed)
eventType
- The event type to fireurlStr
- the current url as a stringfeed
- The feed to pass to the eventpublic void addFetcherEventListener(FetcherListener listener)
FeedFetcher
Add a FetcherListener.
The FetcherListener will receive an FetcherEvent when a Fetcher event (feed polled, retrieved, etc) occurs
addFetcherEventListener
in interface FeedFetcher
listener
- The FetcherListener to recieve the eventpublic void removeFetcherEventListener(FetcherListener listener)
FeedFetcher
Remove a FetcherListener
removeFetcherEventListener
in interface FeedFetcher
listener
- The FetcherListener to removepublic boolean isUsingDeltaEncoding()
FeedFetcher
Is this fetcher using rfc3229 delta encoding?
isUsingDeltaEncoding
in interface FeedFetcher
public void setUsingDeltaEncoding(boolean useDeltaEncoding)
FeedFetcher
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!
setUsingDeltaEncoding
in interface FeedFetcher
useDeltaEncoding
- The useDeltaEncoding to set.protected void handleErrorCodes(int responseCode) throws FetcherException
Handles HTTP error codes.
responseCode
- the HTTP response codeFetcherException
- if response code is in the range 400 to 599 inclusiveprotected void throw4XXError(int responseCode) throws FetcherException
FetcherException
protected void throwAuthenticationError(int responseCode) throws FetcherException
FetcherException
public static SyndFeed combineFeeds(SyndFeed originalFeed, SyndFeed newFeed)
Combine the entries in two feeds into a single feed.
The returned feed will have the same data as the newFeed parameter, with the entries from originalFeed appended to the end of its entries.
originalFeed
- newFeed
- public boolean isPreserveWireFeed()
public void setPreserveWireFeed(boolean preserveWireFeed)
FeedFetcher
setPreserveWireFeed
in interface FeedFetcher
public boolean isAllowDoctypes()
public void setAllowDoctypes(boolean allowDoctypes)
FeedFetcher
setAllowDoctypes
in interface FeedFetcher
allowDoctypes
- true when Doctype declarations should be allowed again, false otherwiseCopyright © 2016. All rights reserved.