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 ContainerConfigException extends Exception {
07: static final Reason INVALID_CONTAINER_START_TIMEOUT = new Reason(
08: "Invalid container start timeout.");
09: static final Reason INVALID_APPLICATION_START_TIMEOUT = new Reason(
10: "Invalid application start timeout.");
11: static final Reason INVALID_APPLICATION_EXECUTION_TIMEOUT = new Reason(
12: "Invalid application execution timeout.");
13: static final Reason INVALID_APPLICATION_INSTANCE_COUNT = new Reason(
14: "Invalid application instance count");
15:
16: private final Reason reason;
17:
18: ContainerConfigException(String message, Reason reason) {
19: super (message);
20: this .reason = reason;
21: }
22:
23: Reason getReason() {
24: return this .reason;
25: }
26:
27: static class Reason {
28: private final String name;
29:
30: private Reason(String name) {
31: this .name = name;
32: }
33:
34: public String toString() {
35: return this.name;
36: }
37: }
38: }
|