|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.torrentMech.crawler.TorrentCrawler
public class TorrentCrawler
TorrentCrawler is a web-crawling thread that works in tandem with various "plugins" to pull
torrent files off the web. To crawl for torrents, all the plugins from the
com.torrentMech.crawler.plugins package are read in and their classpaths stored
in an array. Each plugin is then dynamically loaded and started in its own thread.
The plugin is an implementation of the com.torrentMech.crawler.Plugin interface.
A plugin will contain the parsers needed for a particular web page or site.
TorrentCrawler's job is three-fold.
com.torrentMech.codec.Torrent objects
| Field Summary | |
|---|---|
private java.io.File[] |
pluginPaths
Internally stored array of Java classpaths to the plugins contained in the com.torrentMech.crawler.plugins package. |
| Constructor Summary | |
|---|---|
TorrentCrawler()
Creates a new TorrentCrawler instance. |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] a)
|
void |
run()
The implementation of the java.lang.Runnable interface that starts the launching of the
plugins. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.io.File[] pluginPaths
com.torrentMech.crawler.plugins package.
| Constructor Detail |
|---|
public TorrentCrawler()
com.torrentMech.crawler.plugins
package and stores every class file found there that implements the com.torrentMech.crawler.Plugin
interface in an array of classpaths. These classpaths will later be used to dynamically load each plugin.
| Method Detail |
|---|
public static void main(java.lang.String[] a)
public void run()
java.lang.Runnable interface that starts the launching of the
plugins. Each plugin is dynamically loaded and started in a new thread. The status of these plugins is
queried from time to time throughout their lifecycle and reported. When completed, the plugins torrents
are decoded and stored in the DBMS.
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||