1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.commons.modeler.demo;
20
21
22 /***
23 * <p>Sample managed object for the Modeler Demonstration Application,
24 * based on the Catalina architecture of Tomcat 4.</p>
25 *
26 * @author Craig R. McClanahan
27 * @version $Revision: 480402 $ $Date: 2006-11-29 04:43:23 +0000 (Wed, 29 Nov 2006) $
28 */
29
30 public class Engine implements Container {
31
32
33
34
35
36 /***
37 * Construct a default instance of this class.
38 */
39 public Engine() {
40
41 super();
42
43 }
44
45
46 /***
47 * Construct a configured instance of this class.
48 *
49 * @param name Name of this Engine
50 * @param defaultHost Default host name for this Engine
51 * @param service Associated service
52 */
53 public Engine(String name, String defaultHost, Service service) {
54
55 super();
56 setName(name);
57 setDefaultHost(defaultHost);
58 setService(service);
59
60 }
61
62
63
64
65
66
67
68
69 /***
70 * The default host name of this Engine.
71 */
72 private String defaultHost = null;
73
74 public String getDefaultHost() {
75 return (this.defaultHost);
76 }
77
78 public void setDefaultHost(String defaultHost) {
79 this.defaultHost = null;
80 }
81
82
83 /***
84 * The name of this Engine.
85 */
86 private String name = null;
87
88 public String getName() {
89 return (this.name);
90 }
91
92 public void setName(String name) {
93 this.name = name;
94 }
95
96
97 /***
98 * The parent Container of this Engine.
99 */
100 private Container parent = null;
101
102 public Container getParent() {
103 return (this.parent);
104 }
105
106 public void setParent(Container parent) {
107 this.parent = parent;
108 }
109
110
111 /***
112 * The associated Service of this Engine.
113 */
114 private Service service = null;
115
116 public Service getService() {
117 return (this.service);
118 }
119
120 public void setService(Service service) {
121 this.service = service;
122 }
123
124
125 /***
126 * Return a String representation of this object.
127 */
128 public String toString() {
129
130 StringBuffer sb = new StringBuffer("Engine[");
131 sb.append("name=");
132 sb.append(name);
133 sb.append(", defaultHost=");
134 sb.append(defaultHost);
135 sb.append("]");
136 return (sb.toString());
137
138 }
139
140
141 }