/** 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); } }
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); } } }
public void exitExecution(String message) { setStatus(STATUS_EXIT); this.message = message; }
public void stopExecution() { setStatus(STATUS_STOPPED); }