Package placeholder.ui

Source Code of placeholder.ui.NoUI

package placeholder.ui;

import java.io.PrintStream;

import placeholder.Crawler;
import placeholder.check.CheckServices;
import placeholder.website.queue.WebsiteQueue;
import placeholder.website.queue.WebsiteResultQueue;

/**
* @author Heiko Bornholdt
*/
public class NoUI {
  public static void main(String[] args) {
    int clients = 1;
    try {
      clients = new Integer(args[0]);
    }
    catch (Exception e) {
      // do nothing
    }

    try {
      CheckServices.load();
    } catch (Exception e) {
      throw new RuntimeException(e);
    }

    PrintStream out = System.out;
    WebsiteQueue queue = new placeholder.website.queue.http.HttpWebsiteQueue(out);
    WebsiteResultQueue resultQueue = new placeholder.website.queue.http.HttpWebsiteResultQueue(out);
   
    for (int i = 0; i < clients; i++) {
      new Crawler(out, queue, resultQueue).start();
    }
  }
}
TOP

Related Classes of placeholder.ui.NoUI

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.