Beispiel #1
0
 /**
  * This method is used to fetch the required resource from the network by using one
  * of the supplied fetchers, null will be returned if no fetcher can fetch the required
  * content
  */
 public ResourceContent fetchResource(String url)
 {
     if (url == null)
     {
         throw new NullReferenceException();
     }
     foreach (String protcolId in resourceFetchers.Keys)
     {
         if (resourceFetchers[protcolId].canFetch(url) == true)
         {
             RuntimeStatistics.addToFetchedUrls(1);
             return(resourceFetchers[protcolId].fetch(url, timeOut, 0));
         }
     }
     return(null);
 }