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