1 4 package com.tc.simulator.container; 5 6 public final class ContainerConfigException extends Exception { 7 static final Reason INVALID_CONTAINER_START_TIMEOUT = new Reason("Invalid container start timeout."); 8 static final Reason INVALID_APPLICATION_START_TIMEOUT = new Reason("Invalid application start timeout."); 9 static final Reason INVALID_APPLICATION_EXECUTION_TIMEOUT = new Reason("Invalid application execution timeout."); 10 static final Reason INVALID_APPLICATION_INSTANCE_COUNT = new Reason("Invalid application instance count"); 11 12 private final Reason reason; 13 14 ContainerConfigException(String message, Reason reason) { 15 super(message); 16 this.reason = reason; 17 } 18 19 Reason getReason() { 20 return this.reason; 21 } 22 23 static class Reason { 24 private final String name; 25 26 private Reason(String name) { 27 this.name = name; 28 } 29 30 public String toString() { 31 return this.name; 32 } 33 } 34 } | Popular Tags |