Esempio n. 1
0
  /** Inform all scraper listeners that an error has occured during scraper execution. */
  public void informListenersAboutError(Exception e) {
    setStatus(STATUS_ERROR);

    // inform al listeners that execution is continued
    Iterator listenersIterator = this.scraperRuntimeListeners.iterator();
    while (listenersIterator.hasNext()) {
      ScraperRuntimeListener listener = (ScraperRuntimeListener) listenersIterator.next();
      listener.onExecutionError(this, e);
    }
  }
Esempio n. 2
0
  public void continueExecution() {
    if (this.status == STATUS_PAUSED) {
      setStatus(STATUS_RUNNING);

      // inform al listeners that execution is continued
      Iterator listenersIterator = this.scraperRuntimeListeners.iterator();
      while (listenersIterator.hasNext()) {
        ScraperRuntimeListener listener = (ScraperRuntimeListener) listenersIterator.next();
        listener.onExecutionContinued(this);
      }
    }
  }
Esempio n. 3
0
 public void exitExecution(String message) {
   setStatus(STATUS_EXIT);
   this.message = message;
 }
Esempio n. 4
0
 public void stopExecution() {
   setStatus(STATUS_STOPPED);
 }