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.app;
05:
06: public class MockApplication implements Application {
07:
08: public String globalId;
09: public long waitInterval;
10: public boolean throwException;
11: public RuntimeException exception;
12: public boolean result;
13:
14: public void run() {
15: try {
16: Thread.sleep(waitInterval);
17: } catch (InterruptedException e) {
18: throw new RuntimeException(e);
19: }
20: if (this .throwException) {
21: throw exception;
22: }
23: }
24:
25: public String getApplicationId() {
26: return this .globalId;
27: }
28:
29: public boolean interpretResult(Object o) {
30: return result;
31: }
32: }
|