152153154155156157158159160
@Override public void waitForResults() { ResultsChecker rc = new ResultsChecker(this, false); // don't start the thread, just run its method rc.run(); }
162163164165166167168169170171172
@Override public void waitForResults(long timeout) throws InterruptedException, TimeoutException { ResultsChecker rrt = new ResultsChecker(this, false); Thread worker = new Thread(rrt); worker.start(); worker.join(timeout); if (worker.isAlive()) {
178179180181182183184185186
@Override public void subscribeForResults(ResultObserver observer) { observers.add(observer); ResultsChecker rrt = new ResultsChecker(this, true); Thread worker = new Thread(rrt); worker.start(); }