Package com.rometools.fetcher.impl
Class AbstractFeedFetcher
- java.lang.Object
-
- com.rometools.fetcher.impl.AbstractFeedFetcher
-
- All Implemented Interfaces:
FeedFetcher
- Direct Known Subclasses:
HttpClientFeedFetcher,HttpURLFeedFetcher
@Deprecated public abstract class AbstractFeedFetcher extends Object implements FeedFetcher
Deprecated.ROME Fetcher will be dropped in the next major version of ROME (version 2). For more information and some migration hints, please have a look at our detailed explanation.
-
-
Field Summary
-
Fields inherited from interface com.rometools.fetcher.FeedFetcher
DEFAULT_USER_AGENT
-
-
Constructor Summary
Constructors Constructor Description AbstractFeedFetcher()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddFetcherEventListener(FetcherListener listener)Deprecated.Add a FetcherListener.static SyndFeedcombineFeeds(SyndFeed originalFeed, SyndFeed newFeed)Deprecated.Combine the entries in two feeds into a single feed.protected voidfireEvent(String eventType, String urlStr)Deprecated.protected voidfireEvent(String eventType, String urlStr, SyndFeed feed)Deprecated.protected voidfireEvent(String eventType, URLConnection connection)Deprecated.protected voidfireEvent(String eventType, URLConnection connection, SyndFeed feed)Deprecated.StringgetUserAgent()Deprecated.protected voidhandleErrorCodes(int responseCode)Deprecated.Handles HTTP error codes.booleanisAllowDoctypes()Deprecated.booleanisPreserveWireFeed()Deprecated.booleanisUsingDeltaEncoding()Deprecated.Is this fetcher using rfc3229 delta encoding?voidremoveFetcherEventListener(FetcherListener listener)Deprecated.Remove a FetcherListenervoidsetAllowDoctypes(boolean allowDoctypes)Deprecated.In ROME 1.5.1 we fixed a security vulnerability by disallowing Doctype declarations by default.voidsetPreserveWireFeed(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.voidsetUserAgent(String string)Deprecated.voidsetUsingDeltaEncoding(boolean useDeltaEncoding)Deprecated.Turn on or off rfc3229 delta encodingprotected voidthrow4XXError(int responseCode)Deprecated.protected voidthrowAuthenticationError(int responseCode)Deprecated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.rometools.fetcher.FeedFetcher
retrieveFeed, retrieveFeed
-
-
-
-
Method Detail
-
getUserAgent
public String getUserAgent()
Deprecated.- Specified by:
getUserAgentin interfaceFeedFetcher- Returns:
- the User-Agent currently being sent to servers
-
setUserAgent
public void setUserAgent(String string)
Deprecated.- Specified by:
setUserAgentin interfaceFeedFetcher- Parameters:
string- The User-Agent to sent to servers
-
fireEvent
protected void fireEvent(String eventType, URLConnection connection)
Deprecated.- Parameters:
eventType- The event type to fireconnection- the current connection
-
fireEvent
protected void fireEvent(String eventType, URLConnection connection, SyndFeed feed)
Deprecated.- Parameters:
eventType- The event type to fireconnection- the current connectionfeed- The feed to pass to the event
-
fireEvent
protected void fireEvent(String eventType, String urlStr)
Deprecated.- Parameters:
eventType- The event type to fireurlStr- the current url as a string
-
fireEvent
protected void fireEvent(String eventType, String urlStr, SyndFeed feed)
Deprecated.- Parameters:
eventType- The event type to fireurlStr- the current url as a stringfeed- The feed to pass to the event
-
addFetcherEventListener
public void addFetcherEventListener(FetcherListener listener)
Deprecated.Description copied from interface:FeedFetcherAdd a FetcherListener.
The FetcherListener will receive an FetcherEvent when a Fetcher event (feed polled, retrieved, etc) occurs
- Specified by:
addFetcherEventListenerin interfaceFeedFetcher- Parameters:
listener- The FetcherListener to recieve the event
-
removeFetcherEventListener
public void removeFetcherEventListener(FetcherListener listener)
Deprecated.Description copied from interface:FeedFetcherRemove a FetcherListener
- Specified by:
removeFetcherEventListenerin interfaceFeedFetcher- Parameters:
listener- The FetcherListener to remove
-
isUsingDeltaEncoding
public boolean isUsingDeltaEncoding()
Deprecated.Description copied from interface:FeedFetcherIs this fetcher using rfc3229 delta encoding?
- Specified by:
isUsingDeltaEncodingin interfaceFeedFetcher- Returns:
- Returns the useDeltaEncoding.
-
setUsingDeltaEncoding
public void setUsingDeltaEncoding(boolean useDeltaEncoding)
Deprecated.Description copied from interface:FeedFetcherTurn 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!
- Specified by:
setUsingDeltaEncodingin interfaceFeedFetcher- Parameters:
useDeltaEncoding- The useDeltaEncoding to set.
-
handleErrorCodes
protected void handleErrorCodes(int responseCode) throws FetcherExceptionDeprecated.Handles HTTP error codes.
- Parameters:
responseCode- the HTTP response code- Throws:
FetcherException- if response code is in the range 400 to 599 inclusive
-
throw4XXError
protected void throw4XXError(int responseCode) throws FetcherExceptionDeprecated.- Throws:
FetcherException
-
throwAuthenticationError
protected void throwAuthenticationError(int responseCode) throws FetcherExceptionDeprecated.- Throws:
FetcherException
-
combineFeeds
public static SyndFeed combineFeeds(SyndFeed originalFeed, SyndFeed newFeed)
Deprecated.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.
- Parameters:
originalFeed-newFeed-- Returns:
-
isPreserveWireFeed
public boolean isPreserveWireFeed()
Deprecated.
-
setPreserveWireFeed
public void setPreserveWireFeed(boolean preserveWireFeed)
Deprecated.Description copied from interface:FeedFetcherIf set to true, the WireFeed will be made accessible from the SyndFeed object returned from the Fetcher via the originalWireFeed() method. Each Entry in the feed will have the corresponding wireEntry property set.- Specified by:
setPreserveWireFeedin interfaceFeedFetcher
-
isAllowDoctypes
public boolean isAllowDoctypes()
Deprecated.
-
setAllowDoctypes
public void setAllowDoctypes(boolean allowDoctypes)
Deprecated.Description copied from interface:FeedFetcherIn ROME 1.5.1 we fixed a security vulnerability by disallowing Doctype declarations by default. This change breaks the compatibility with at least RSS 0.91N because it requires a Doctype declaration. You are able to allow Doctype declarations again with this property. You should only activate it when the feeds that you process are absolutely trustful.- Specified by:
setAllowDoctypesin interfaceFeedFetcher- Parameters:
allowDoctypes- true when Doctype declarations should be allowed again, false otherwise
-
-