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.tcsimulator;
05:
06: import java.util.ArrayList;
07: import java.util.Iterator;
08: import java.util.List;
09:
10: public class ContainerSpec {
11:
12: private final String testHome;
13: private final int executionCount;
14: private final String vmName;
15: private final List jvmOpts;
16:
17: public ContainerSpec(String vmName, String testHome,
18: int executionCount, List jvmOpts) {
19: this .vmName = vmName;
20: this .testHome = testHome;
21: this .executionCount = executionCount;
22: this .jvmOpts = jvmOpts;
23: }
24:
25: public ContainerSpec copy() {
26: List jvmOptsCopy = new ArrayList();
27: jvmOptsCopy.addAll(jvmOpts);
28: return new ContainerSpec(vmName, testHome, executionCount,
29: jvmOptsCopy);
30: }
31:
32: public String getTestHome() {
33: return testHome;
34: }
35:
36: public int getExecutionCount() {
37: return executionCount;
38: }
39:
40: public String getVmName() {
41: return vmName;
42: }
43:
44: public List getJvmOpts() {
45: return jvmOpts;
46: }
47:
48: public String toString() {
49: StringBuffer jopts = new StringBuffer();
50: for (Iterator i = jvmOpts.iterator(); i.hasNext();) {
51: jopts.append((String) i.next());
52: }
53: return "vmName: " + vmName + ", testHome: " + testHome
54: + ", executionCount: " + executionCount + ", jvmOpts: "
55: + jopts.toString();
56: }
57: }
|