01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.simulator.listener;
05:
06: import com.tc.simulator.app.ErrorContext;
07:
08: import java.util.ArrayList;
09: import java.util.List;
10:
11: public class MockResultsListener implements ResultsListener {
12:
13: public boolean dumpErrors = false;
14: public List errors = new ArrayList();
15: public boolean notifyStartTimeoutCalled;
16: public boolean notifyExecutionTimeoutCalled;
17: public Object result;
18:
19: public void notifyStartTimeout() {
20: this .notifyStartTimeoutCalled = true;
21: }
22:
23: public void notifyExecutionTimeout() {
24: this .notifyExecutionTimeoutCalled = true;
25: }
26:
27: public synchronized void notifyError(ErrorContext ectxt) {
28: if (dumpErrors)
29: 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: }
|