public class RomeAdapter extends AbstractNewsAdapter
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ANTISAMY_POLICY |
protected org.apache.commons.logging.Log |
log |
static String |
PREFERENCE_DESCRIPTION_POLICY |
static String |
PREFERENCE_TITLE_POLICY |
| Constructor and Description |
|---|
RomeAdapter() |
| Modifier and Type | Method and Description |
|---|---|
long |
getConnectionManagerTimeout() |
int |
getConnectionTimeout() |
org.apache.http.impl.client.AbstractHttpClient |
getHttpClient() |
protected String[] |
getPolicyPref(String... policyKey) |
int |
getReadTimeout() |
NewsFeed |
getSyndFeed(NewsConfiguration config,
int page) |
protected PaginatingNewsFeed |
getSyndFeed(String url,
String titlePolicy,
String descriptionPolicy)
Retrieve the entire feed using HTTPClient and clean using AntiSamy,
build an SyndFeed object using ROME.
|
int |
getTimesToRetry() |
void |
init() |
void |
setCache(net.sf.ehcache.Cache cache) |
void |
setCacheKeyPrefix(String prefix)
Cache prefix to support multiple instances of this class using the same cache.
|
void |
setConnectionManagerTimeout(long connectionManagerTimeout) |
void |
setConnectionTimeout(int connectionTimeout) |
void |
setHttpClient(org.apache.http.impl.client.AbstractHttpClient httpClient) |
void |
setProcessor(RomeNewsProcessorImpl processor) |
void |
setProxyHost(String proxyHost) |
void |
setProxyPort(String proxyPort) |
void |
setReadTimeout(int readTimeout) |
void |
setTimesToRetry(int timesToRetry) |
getClassName, getDescriptionKey, getNameKeyprotected final org.apache.commons.logging.Log log
public static final String PREFERENCE_TITLE_POLICY
public static final String PREFERENCE_DESCRIPTION_POLICY
public static final String DEFAULT_ANTISAMY_POLICY
public org.apache.http.impl.client.AbstractHttpClient getHttpClient()
public void setHttpClient(org.apache.http.impl.client.AbstractHttpClient httpClient)
public void setProxyHost(String proxyHost)
public void setProxyPort(String proxyPort)
public int getConnectionTimeout()
public void setConnectionTimeout(int connectionTimeout)
public int getReadTimeout()
public void setReadTimeout(int readTimeout)
public long getConnectionManagerTimeout()
public void setConnectionManagerTimeout(long connectionManagerTimeout)
public int getTimesToRetry()
public void setTimesToRetry(int timesToRetry)
public void setProcessor(RomeNewsProcessorImpl processor)
public void setCacheKeyPrefix(String prefix)
prefix - Unique prefix for cache entries for this particular instancepublic NewsFeed getSyndFeed(NewsConfiguration config, int page) throws NewsException
NewsExceptionprotected PaginatingNewsFeed getSyndFeed(String url, String titlePolicy, String descriptionPolicy) throws NewsException
url - String of the feed to be retrievedtitlePolicy - String the cleaning policy for the titledescriptionPolicy - String the cleaning policy for the descriptionNewsExceptionpublic void setCache(net.sf.ehcache.Cache cache)
Copyright © 2009-2015 Jasig. All Rights Reserved.