KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tcsimulator > SimpleApplicationConfig


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tcsimulator;
5
6 import com.tc.objectserver.control.ServerControl;
7 import com.tc.simulator.app.ApplicationConfig;
8
9 import java.util.HashMap JavaDoc;
10 import java.util.Map JavaDoc;
11
12 public class SimpleApplicationConfig implements ApplicationConfig {
13   
14   private final Map JavaDoc attributes = new HashMap JavaDoc();
15   
16   public SimpleApplicationConfig() {
17     // XXX: This is pretty retarded.
18
setAttribute("sleepInterval", "0");
19     setAttribute("throwException", Boolean.FALSE.toString());
20   }
21   
22   public String JavaDoc getApplicationClassname() {
23     return SimpleApplication.class.getName();
24   }
25
26   public void setAttribute(String JavaDoc key, String JavaDoc value) {
27     attributes.put(key, value);
28   }
29
30   public String JavaDoc getAttribute(String JavaDoc key) {
31     return (String JavaDoc)attributes.get(key);
32   }
33
34   public int getIntensity() {
35     throw new AssertionError JavaDoc();
36   }
37
38   public int getGlobalParticipantCount() {
39     throw new AssertionError JavaDoc();
40   }
41
42   public ApplicationConfig copy() {
43     throw new AssertionError JavaDoc();
44   }
45
46   public ServerControl getServerControl() {
47     throw new AssertionError JavaDoc();
48   }
49 }
50
Free Books   Free Magazines  
Popular Tags