1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.modeler.demo;
19
20
21 /***
22 * <p>Sample managed object for the Modeler Demonstration Application,
23 * based on the Catalina architecture of Tomcat 4.</p>
24 *
25 * @author Craig R. McClanahan
26 * @version $Revision: 155428 $ $Date: 2005-02-26 08:12:25 -0500 (Sat, 26 Feb 2005) $
27 */
28
29 public class Connector {
30
31
32
33
34
35 /***
36 * Construct a default instance of this class.
37 */
38 public Connector() {
39
40 super();
41
42 }
43
44
45 /***
46 * Construct a configured instance of this class.
47 *
48 * @param port Port number
49 * @param scheme Protocol (scheme)
50 * @param secure Secure flag
51 * @param service Associated service
52 * @param container Associated container
53 */
54 public Connector(int port, String scheme, boolean secure,
55 Service service, Container container) {
56
57 super();
58 setPort(port);
59 setScheme(scheme);
60 setSecure(secure);
61 setService(service);
62 setContainer(container);
63
64 }
65
66
67
68
69
70
71
72
73 /***
74 * The Container for this Connector.
75 */
76 private Container container = null;
77
78 public Container getContainer() {
79 return (this.container);
80 }
81
82 public void setContainer(Container container) {
83 this.container = container;
84 }
85
86
87 /***
88 * The port number of this Connector.
89 */
90 private int port = 8080;
91
92 public int getPort() {
93 return (this.port);
94 }
95
96 public void setPort(int port) {
97 this.port = port;
98 }
99
100
101 /***
102 * The scheme of this Connector.
103 */
104 private String scheme = "http";
105
106 public String getScheme() {
107 return (this.scheme);
108 }
109
110 public void setScheme(String scheme) {
111 this.scheme = scheme;
112 }
113
114
115 /***
116 * The secure flag of this Connector.
117 */
118 private boolean secure = false;
119
120 public boolean getSecure() {
121 return (this.secure);
122 }
123
124 public void setSecure(boolean secure) {
125 this.secure = secure;
126 }
127
128
129 /***
130 * The associated Service of this Connector.
131 */
132 private Service service = null;
133
134 public Service getService() {
135 return (this.service);
136 }
137
138 public void setService(Service service) {
139 this.service = service;
140 }
141
142
143 /***
144 * Return a String representation of this object.
145 */
146 public String toString() {
147
148 StringBuffer sb = new StringBuffer("Connector[");
149 sb.append("port=");
150 sb.append(port);
151 sb.append(", scheme=");
152 sb.append(scheme);
153 sb.append(", secure=");
154 sb.append(secure);
155 sb.append("]");
156 return (sb.toString());
157
158 }
159
160
161 }