KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > simulator > container > ContainerResult


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.tc.simulator.container;
5
6 public final class ContainerResult {
7   private final boolean success;
8   private final int applicationInstanceCount;
9   
10   ContainerResult() {
11     this(false, 0);
12   }
13   
14   ContainerResult(Container.ContainerExecutionInstance containerExecution) {
15     this(containerExecution.getResult(), containerExecution.getExecutionCount());
16   }
17   
18   private ContainerResult(boolean success, int applicationInstanceCount) {
19     this.success = success;
20     this.applicationInstanceCount = applicationInstanceCount;
21   }
22   
23   public String JavaDoc toString() {
24     return getClass().getName() + "@" + System.identityHashCode(this)
25     + "[application instance count: " + this.applicationInstanceCount + ", success=" + success + "]";
26   }
27   
28   public boolean success() {
29     return this.success;
30   }
31
32   public int getApplicationInstanceCount() {
33     return this.applicationInstanceCount;
34   }
35 }
36
Popular Tags