pc.setApplicationContext(appContext);
if (pc.getDaemonPort() != -1 && pc.getDaemonWait() != -1) {
new CrawlDaemon(pc.getDaemonWait(), pc, pc.getDaemonPort())
.startCrawling();
} else {
pc.crawl();
}
} catch (Exception e) {
throw new CmdLineActionException("Failed to launch crawler : "
+ e.getMessage(), e);
}