org.rometools.fetcher.impl
Class HttpClientFeedFetcher

java.lang.Object
  extended by org.rometools.fetcher.impl.AbstractFeedFetcher
      extended by org.rometools.fetcher.impl.HttpClientFeedFetcher
All Implemented Interfaces:
FeedFetcher

public class HttpClientFeedFetcher
extends AbstractFeedFetcher

Author:
Nick Lothian

Nested Class Summary
static interface HttpClientFeedFetcher.CredentialSupplier
           
static interface HttpClientFeedFetcher.HttpClientMethodCallbackIntf
           
 
Field Summary
 
Fields inherited from interface org.rometools.fetcher.FeedFetcher
DEFAULT_USER_AGENT
 
Constructor Summary
HttpClientFeedFetcher()
           
HttpClientFeedFetcher(FeedFetcherCache cache)
           
HttpClientFeedFetcher(FeedFetcherCache cache, HttpClientFeedFetcher.CredentialSupplier credentialSupplier)
           
 
Method Summary
 int getConnectTimeout()
           
 HttpClientFeedFetcher.CredentialSupplier getCredentialSupplier()
           
 FeedFetcherCache getFeedInfoCache()
           
 HttpClientFeedFetcher.HttpClientMethodCallbackIntf getHttpClientMethodCallback()
           
 org.apache.commons.httpclient.params.HttpClientParams getHttpClientParams()
           
 int getReadTimeout()
           
 com.sun.syndication.feed.synd.SyndFeed retrieveFeed(String userAgent, URL feedUrl)
           
 com.sun.syndication.feed.synd.SyndFeed retrieveFeed(URL url)
          Retrieve a feed over HTTP
 void setConnectTimeout(int timeout)
           
 void setCredentialSupplier(HttpClientFeedFetcher.CredentialSupplier credentialSupplier)
           
 void setFeedInfoCache(FeedFetcherCache feedInfoCache)
           
 void setHttpClientMethodCallback(HttpClientFeedFetcher.HttpClientMethodCallbackIntf httpClientMethodCallback)
           
 void setHttpClientParams(org.apache.commons.httpclient.params.HttpClientParams httpClientParams)
           
 void setReadTimeout(int timeout)
           
 
Methods inherited from class org.rometools.fetcher.impl.AbstractFeedFetcher
addFetcherEventListener, combineFeeds, fireEvent, fireEvent, fireEvent, fireEvent, getUserAgent, handleErrorCodes, isPreserveWireFeed, isUsingDeltaEncoding, removeFetcherEventListener, setPreserveWireFeed, setUserAgent, setUsingDeltaEncoding, throw4XXError, throwAuthenticationError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpClientFeedFetcher

public HttpClientFeedFetcher()

HttpClientFeedFetcher

public HttpClientFeedFetcher(FeedFetcherCache cache)
Parameters:
cache -

HttpClientFeedFetcher

public HttpClientFeedFetcher(FeedFetcherCache cache,
                             HttpClientFeedFetcher.CredentialSupplier credentialSupplier)
Method Detail

setConnectTimeout

public void setConnectTimeout(int timeout)
Parameters:
timeout - Sets the connect timeout for the HttpClient but using the URLConnection method name. Uses the HttpClientParams method setConnectionManagerTimeout instead of setConnectTimeout

getConnectTimeout

public int getConnectTimeout()
Returns:
The currently used connect timeout for the HttpClient but using the URLConnection method name. Uses the HttpClientParams method getConnectionManagerTimeout instead of getConnectTimeout

setCredentialSupplier

public void setCredentialSupplier(HttpClientFeedFetcher.CredentialSupplier credentialSupplier)
Parameters:
credentialSupplier - The credentialSupplier to set.

getCredentialSupplier

public HttpClientFeedFetcher.CredentialSupplier getCredentialSupplier()
Returns:
Returns the credentialSupplier.

setFeedInfoCache

public void setFeedInfoCache(FeedFetcherCache feedInfoCache)
Parameters:
feedInfoCache - the feedInfoCache to set

getFeedInfoCache

public FeedFetcherCache getFeedInfoCache()
Returns:
the feedInfoCache.

setHttpClientMethodCallback

public void setHttpClientMethodCallback(HttpClientFeedFetcher.HttpClientMethodCallbackIntf httpClientMethodCallback)

getHttpClientMethodCallback

public HttpClientFeedFetcher.HttpClientMethodCallbackIntf getHttpClientMethodCallback()

setHttpClientParams

public void setHttpClientParams(org.apache.commons.httpclient.params.HttpClientParams httpClientParams)
Parameters:
httpClientParams - The httpClientParams to set.

getHttpClientParams

public org.apache.commons.httpclient.params.HttpClientParams getHttpClientParams()
Returns:
Returns the httpClientParams.

setReadTimeout

public void setReadTimeout(int timeout)

getReadTimeout

public int getReadTimeout()
Returns:
timeout the read timeout for the URLConnection to a specified timeout, in milliseconds.

retrieveFeed

public com.sun.syndication.feed.synd.SyndFeed retrieveFeed(URL url)
                                                    throws IllegalArgumentException,
                                                           IOException,
                                                           com.sun.syndication.io.FeedException,
                                                           FetcherException
Description copied from interface: FeedFetcher
Retrieve a feed over HTTP

Parameters:
url - A non-null URL of a RSS/Atom feed to retrieve
Returns:
A SyndFeed object
Throws:
IllegalArgumentException - if the URL is null;
IOException - if a TCP error occurs
com.sun.syndication.io.FeedException - if the feed is not valid
FetcherException - if a HTTP error occurred

retrieveFeed

public com.sun.syndication.feed.synd.SyndFeed retrieveFeed(String userAgent,
                                                           URL feedUrl)
                                                    throws IllegalArgumentException,
                                                           IOException,
                                                           com.sun.syndication.io.FeedException,
                                                           FetcherException
Throws:
IllegalArgumentException
IOException
com.sun.syndication.io.FeedException
FetcherException
See Also:
FeedFetcher.retrieveFeed(java.net.URL)


Copyright © 2004-2013 ROME Project. All Rights Reserved.