View Javadoc
1   package com.ljs.ootp.extract.html.loader;
2   
3   import java.util.concurrent.Callable;
4   import org.jsoup.nodes.Document;
5   
6   /**
7    *
8    * @author lstephen
9    */
10  public final class PageLoaders {
11  
12      private PageLoaders() { }
13  
14      public static Callable<Document> asCallable(
15          final PageLoader loader, final String url) {
16  
17          return new Callable<Document>() {
18              @Override
19              public Document call() {
20                  return loader.load(url);
21              }
22          };
23      }
24  
25  }