1 4 package com.tc.simulator.listener; 5 6 import com.tc.simulator.app.ErrorContext; 7 8 import java.util.ArrayList ; 9 import java.util.List ; 10 11 12 public class MockResultsListener implements ResultsListener { 13 14 public boolean dumpErrors = false; 15 public List errors = new ArrayList (); 16 public boolean notifyStartTimeoutCalled; 17 public boolean notifyExecutionTimeoutCalled; 18 public Object result; 19 20 public void notifyStartTimeout() { 21 this.notifyStartTimeoutCalled = true; 22 } 23 24 public void notifyExecutionTimeout() { 25 this.notifyExecutionTimeoutCalled = true; 26 } 27 28 public synchronized void notifyError(ErrorContext ectxt) { 29 if (dumpErrors) ectxt.dump(System.err); 30 errors.add(ectxt); 31 } 32 33 public void notifyResult(Object theResult) { 34 this.result = theResult; 35 } 36 37 public void setGlobalId(long globalId) { 38 return; 39 } 40 } | Popular Tags |