|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.feedparser.network.ResourceRequestFactory
public class ResourceRequestFactory
Get a ResourceRequest for a given URL. The request is handled based on the URL.
Field Summary | |
---|---|
static int |
DEFAULT_CONNECT_TIMEOUT
These properties specify the default connect and read timeout (resp.) for the protocol handler used by java.net.URLConnection. |
static int |
DEFAULT_MAX_REDIRECTS
Specify the maximum number of redirects to use. |
static int |
DEFAULT_READ_TIMEOUT
|
static int |
NETWORKADDRESS_CACHE_TTL
Specified in java.security to indicate the caching policy for successful name lookups from the name service.. |
Constructor Summary | |
---|---|
ResourceRequestFactory()
|
Method Summary | |
---|---|
static void |
addEventListener(NetworkEventListener listener)
Add an event listener to this instance of the factory. |
static Iterator |
getNetworkEventListeners()
Get all event listeners. |
static ResourceRequest |
getResourceRequest(String resource)
|
static ResourceRequest |
getResourceRequest(String resource,
long ifModifiedSince)
|
static ResourceRequest |
getResourceRequest(String resource,
long ifModifiedSince,
String etag)
Get a ResourceRequest for the protocol represented in the resource URL. |
static ResourceRequest |
getResourceRequest(URL resource)
|
static boolean |
isOffline()
|
static boolean |
isSupportedScheme(String scheme)
Return true if we support fetching content with the given scheme. |
static boolean |
isTransparentHTCacheEnabled()
Return true if we can enable the htcache. |
static void |
setOffline(boolean offline)
Enable/disable offline operation. |
static void |
setTransparentHTCacheEnabled(boolean enabled)
When the transparent HTCache is enabled we will keep content local similar to the Mozilla cache and return the cached copy and use if-Modified-Since when necessary. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int NETWORKADDRESS_CACHE_TTL
public static int DEFAULT_CONNECT_TIMEOUT
public static int DEFAULT_READ_TIMEOUT
public static int DEFAULT_MAX_REDIRECTS
Constructor Detail |
---|
public ResourceRequestFactory()
Method Detail |
---|
public static ResourceRequest getResourceRequest(String resource, long ifModifiedSince) throws NetworkException
NetworkException
public static ResourceRequest getResourceRequest(String resource, long ifModifiedSince, String etag) throws NetworkException
NetworkException
public static ResourceRequest getResourceRequest(String resource) throws NetworkException
NetworkException
getResourceRequest( String )
public static ResourceRequest getResourceRequest(URL resource) throws NetworkException
NetworkException
getResourceRequest( String )
public static void addEventListener(NetworkEventListener listener)
public static Iterator getNetworkEventListeners()
public static boolean isSupportedScheme(String scheme)
public static void setTransparentHTCacheEnabled(boolean enabled)
public static boolean isTransparentHTCacheEnabled()
public static void setOffline(boolean offline)
public static boolean isOffline()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |