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 Connector {
31
32
33
34
35
36 /***
37 * Construct a default instance of this class.
38 */
39 public Connector() {
40
41 super();
42
43 }
44
45
46 /***
47 * Construct a configured instance of this class.
48 *
49 * @param port Port number
50 * @param scheme Protocol (scheme)
51 * @param secure Secure flag
52 * @param service Associated service
53 * @param container Associated container
54 */
55 public Connector(int port, String scheme, boolean secure,
56 Service service, Container container) {
57
58 super();
59 setPort(port);
60 setScheme(scheme);
61 setSecure(secure);
62 setService(service);
63 setContainer(container);
64
65 }
66
67
68
69
70
71
72
73
74 /***
75 * The Container for this Connector.
76 */
77 private Container container = null;
78
79 public Container getContainer() {
80 return (this.container);
81 }
82
83 public void setContainer(Container container) {
84 this.container = container;
85 }
86
87
88 /***
89 * The port number of this Connector.
90 */
91 private int port = 8080;
92
93 public int getPort() {
94 return (this.port);
95 }
96
97 public void setPort(int port) {
98 this.port = port;
99 }
100
101
102 /***
103 * The scheme of this Connector.
104 */
105 private String scheme = "http";
106
107 public String getScheme() {
108 return (this.scheme);
109 }
110
111 public void setScheme(String scheme) {
112 this.scheme = scheme;
113 }
114
115
116 /***
117 * The secure flag of this Connector.
118 */
119 private boolean secure = false;
120
121 public boolean getSecure() {
122 return (this.secure);
123 }
124
125 public void setSecure(boolean secure) {
126 this.secure = secure;
127 }
128
129
130 /***
131 * The associated Service of this Connector.
132 */
133 private Service service = null;
134
135 public Service getService() {
136 return (this.service);
137 }
138
139 public void setService(Service service) {
140 this.service = service;
141 }
142
143
144 /***
145 * Return a String representation of this object.
146 */
147 public String toString() {
148
149 StringBuffer sb = new StringBuffer("Connector[");
150 sb.append("port=");
151 sb.append(port);
152 sb.append(", scheme=");
153 sb.append(scheme);
154 sb.append(", secure=");
155 sb.append(secure);
156 sb.append("]");
157 return (sb.toString());
158
159 }
160
161
162 }