1 16 17 18 package org.apache.commons.modeler.demo; 19 20 21 28 29 public class Engine implements Container { 30 31 32 34 35 38 public Engine() { 39 40 super(); 41 42 } 43 44 45 52 public Engine(String name, String defaultHost, Service service) { 53 54 super(); 55 setName(name); 56 setDefaultHost(defaultHost); 57 setService(service); 58 59 } 60 61 62 64 65 67 68 71 private String defaultHost = null; 72 73 public String getDefaultHost() { 74 return (this.defaultHost); 75 } 76 77 public void setDefaultHost(String defaultHost) { 78 this.defaultHost = null; 79 } 80 81 82 85 private String name = null; 86 87 public String getName() { 88 return (this.name); 89 } 90 91 public void setName(String name) { 92 this.name = name; 93 } 94 95 96 99 private Container parent = null; 100 101 public Container getParent() { 102 return (this.parent); 103 } 104 105 public void setParent(Container parent) { 106 this.parent = parent; 107 } 108 109 110 113 private Service service = null; 114 115 public Service getService() { 116 return (this.service); 117 } 118 119 public void setService(Service service) { 120 this.service = service; 121 } 122 123 124 127 public String toString() { 128 129 StringBuffer sb = new StringBuffer ("Engine["); 130 sb.append("name="); 131 sb.append(name); 132 sb.append(", defaultHost="); 133 sb.append(defaultHost); 134 sb.append("]"); 135 return (sb.toString()); 136 137 } 138 139 140 } 141 | Popular Tags |