01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tcsimulator;
06:
07: import com.tc.net.proxy.TCPProxy;
08: import com.tc.objectserver.control.ServerControl;
09: import com.tc.simulator.app.ApplicationConfig;
10:
11: import java.util.HashMap;
12: import java.util.Map;
13:
14: public class SimpleApplicationConfig implements ApplicationConfig {
15:
16: private final Map attributes = new HashMap();
17:
18: public SimpleApplicationConfig() {
19: // XXX: This is pretty retarded.
20: setAttribute("sleepInterval", "0");
21: setAttribute("throwException", Boolean.FALSE.toString());
22: }
23:
24: public String getApplicationClassname() {
25: return SimpleApplication.class.getName();
26: }
27:
28: public void setAttribute(String key, String value) {
29: attributes.put(key, value);
30: }
31:
32: public String getAttribute(String key) {
33: return (String) attributes.get(key);
34: }
35:
36: public int getIntensity() {
37: throw new AssertionError();
38: }
39:
40: public int getGlobalParticipantCount() {
41: throw new AssertionError();
42: }
43:
44: public ApplicationConfig copy() {
45: throw new AssertionError();
46: }
47:
48: public ServerControl getServerControl() {
49: throw new AssertionError();
50: }
51:
52: public int getValidatorCount() {
53: throw new AssertionError();
54: }
55:
56: public int getGlobalValidatorCount() {
57: throw new AssertionError();
58: }
59:
60: public TCPProxy[] getProxies() {
61: throw new AssertionError();
62: }
63:
64: public ServerControl[] getServerControls() {
65: throw new AssertionError();
66: }
67:
68: public Object getAttributeObject(String key) {
69: throw new AssertionError();
70: }
71: }
|