com.sun.syndication.fetcher.impl
Class AbstractFeedFetcher
java.lang.Object
com.sun.syndication.fetcher.impl.AbstractFeedFetcher
- All Implemented Interfaces:
- FeedFetcher
- Direct Known Subclasses:
- HttpClientFeedFetcher, HttpURLFeedFetcher
- public abstract class AbstractFeedFetcher
- extends java.lang.Object
- implements FeedFetcher
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractFeedFetcher
public AbstractFeedFetcher()
getUserAgent
public java.lang.String getUserAgent()
- Specified by:
getUserAgent
in interface FeedFetcher
- Returns:
- the User-Agent currently being sent to servers
setUserAgent
public void setUserAgent(java.lang.String string)
- Specified by:
setUserAgent
in interface FeedFetcher
- Parameters:
string
- The User-Agent to sent to servers
fireEvent
protected void fireEvent(java.lang.String eventType,
java.net.URLConnection connection)
- Parameters:
eventType
- The event type to fireconnection
- the current connection
fireEvent
protected void fireEvent(java.lang.String eventType,
java.lang.String urlStr)
- Parameters:
eventType
- The event type to fireurlStr
- the current url as a string
addFetcherEventListener
public void addFetcherEventListener(FetcherListener listener)
- Description copied from interface:
FeedFetcher
Add a FetcherListener.
The FetcherListener will receive an FetcherEvent when
a Fetcher event (feed polled, retrieved, etc) occurs
- Specified by:
addFetcherEventListener
in interface FeedFetcher
- Parameters:
listener
- The FetcherListener to recieve the event- See Also:
FeedFetcher.addFetcherEventListener(com.sun.syndication.fetcher.FetcherListener)
removeFetcherPolledListener
public void removeFetcherPolledListener(FetcherListener listener)
- Description copied from interface:
FeedFetcher
Remove a FetcherListener
- Specified by:
removeFetcherPolledListener
in interface FeedFetcher
- Parameters:
listener
- The FetcherListener to remove- See Also:
FeedFetcher.removeFetcherPolledListener(com.sun.syndication.fetcher.FetcherListener)
handleErrorCodes
protected void handleErrorCodes(int responseCode)
throws FetcherException
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 FetcherException
- Throws:
FetcherException
Copyright © 2004 Sun Microsystems. All Rights Reserved.