org.apache.jetspeed.services.urlmanager
Class URLFetcher

java.lang.Object
  extended byorg.apache.jetspeed.services.urlmanager.URLFetcher

public class URLFetcher
extends java.lang.Object

Handles fetching URLs and if for some reason anything happens add it to the BadURLManager. There are also some util methods for downloading URLs that don't use the Disk Cache.

Version:
$Id: URLFetcher.java,v 1.14 2004/02/23 03:30:47 jford Exp $
Author:
Kevin A. Burton, Santiago Gala

Constructor Summary
URLFetcher()
           
 
Method Summary
static java.io.Reader fetch(java.lang.String url)
           
static java.io.Reader fetch(java.lang.String url, boolean force)
          Try and fetch a URL as and get the content as a String and possibly add the URL to the BadURLManager if anything goes wrong.
static java.util.Hashtable getRealtimeURLs()
          Return the list of realtime URLs for debug
static boolean refresh(java.lang.String url)
          Try and fetch a URL if the copy in the cache has expired and add the URL to the BadURLManager if anything goes wrong.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLFetcher

public URLFetcher()
Method Detail

fetch

public static final java.io.Reader fetch(java.lang.String url)
                                  throws java.io.IOException
Throws:
java.io.IOException

fetch

public static final java.io.Reader fetch(java.lang.String url,
                                         boolean force)
                                  throws java.io.IOException
Try and fetch a URL as and get the content as a String and possibly add the URL to the BadURLManager if anything goes wrong.

Parameters:
url - The URL to fetch
force - if set to true then do not use force this entry to be in the cache... IE do not use CACHE_REQUIRE_CACHED
Throws:
java.io.IOException

refresh

public static final boolean refresh(java.lang.String url)
                             throws java.io.IOException
Try and fetch a URL if the copy in the cache has expired and add the URL to the BadURLManager if anything goes wrong.

Parameters:
url - The URL to fetch
Throws:
java.io.IOException

getRealtimeURLs

public static final java.util.Hashtable getRealtimeURLs()
Return the list of realtime URLs for debug



Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.