Class FetchThread<T extends FetchResult>

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.util.Set<T>>

    public final class FetchThread<T extends FetchResult>
    extends java.lang.Object
    implements java.util.concurrent.Callable<java.util.Set<T>>
    Callable fetcher that extracts, for a given list of URLs and with a given Extractor, the content from the list of urls. This is batched, therefore a list of urls to cope with the setup cost of a thread.
    Author:
    thomas.jungblut
    • Constructor Summary

      Constructors 
      Constructor Description
      FetchThread​(java.util.List<java.lang.String> url, Extractor<T> extractor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<T> call()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FetchThread

        public FetchThread​(java.util.List<java.lang.String> url,
                           Extractor<T> extractor)
    • Method Detail

      • call

        public final java.util.Set<T> call()
                                    throws java.lang.Exception
        Specified by:
        call in interface java.util.concurrent.Callable<T extends FetchResult>
        Throws:
        java.lang.Exception