Ejemplo 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);
    }
  }
Ejemplo 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);
      }
    }
  }
Ejemplo n.º 3
0
 public void exitExecution(String message) {
   setStatus(STATUS_EXIT);
   this.message = message;
 }
Ejemplo n.º 4
0
 public void stopExecution() {
   setStatus(STATUS_STOPPED);
 }