1 /*
2 * Licensed under the GPL License. You may not use this file except in compliance with the License.
3 * You may obtain a copy of the License at
4 *
5 * https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6 *
7 * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
8 * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
9 * PURPOSE.
10 */
11 package psiprobe.model;
12
13 import java.util.Locale;
14
15 /**
16 * POJO representing a single http request processor thread.
17 */
18 public class RequestProcessor {
19
20 /** The name. */
21 private String name;
22
23 /** The stage. */
24 private int stage;
25
26 /** The processing time. */
27 private long processingTime;
28
29 /** The bytes sent. */
30 private long bytesSent;
31
32 /** The bytes received. */
33 private long bytesReceived;
34
35 /** The remote addr. */
36 private String remoteAddr;
37
38 /** The remote addr locale. */
39 private Locale remoteAddrLocale;
40
41 /** The virtual host. */
42 private String virtualHost;
43
44 /** The method. */
45 private String method;
46
47 /** The current uri. */
48 private String currentUri;
49
50 /** The current query string. */
51 private String currentQueryString;
52
53 /** The protocol. */
54 private String protocol;
55
56 /** The worker thread name. */
57 private String workerThreadName;
58
59 /** The worker thread name supported. */
60 private boolean workerThreadNameSupported;
61
62 /**
63 * Gets the name.
64 *
65 * @return the name
66 */
67 public String getName() {
68 return name;
69 }
70
71 /**
72 * Sets the name.
73 *
74 * @param name the new name
75 */
76 public void setName(String name) {
77 this.name = name;
78 }
79
80 /**
81 * Gets the stage.
82 *
83 * @return the stage
84 */
85 public int getStage() {
86 return stage;
87 }
88
89 /**
90 * Sets the stage.
91 *
92 * @param stage the new stage
93 */
94 public void setStage(int stage) {
95 this.stage = stage;
96 }
97
98 /**
99 * Gets the processing time.
100 *
101 * @return the processing time
102 */
103 public long getProcessingTime() {
104 return processingTime;
105 }
106
107 /**
108 * Sets the processing time.
109 *
110 * @param processingTime the new processing time
111 */
112 public void setProcessingTime(long processingTime) {
113 this.processingTime = processingTime;
114 }
115
116 /**
117 * Gets the bytes sent.
118 *
119 * @return the bytes sent
120 */
121 public long getBytesSent() {
122 return bytesSent;
123 }
124
125 /**
126 * Sets the bytes sent.
127 *
128 * @param bytesSent the new bytes sent
129 */
130 public void setBytesSent(long bytesSent) {
131 this.bytesSent = bytesSent;
132 }
133
134 /**
135 * Gets the bytes received.
136 *
137 * @return the bytes received
138 */
139 public long getBytesReceived() {
140 return bytesReceived;
141 }
142
143 /**
144 * Sets the bytes received.
145 *
146 * @param bytesReceived the new bytes received
147 */
148 public void setBytesReceived(long bytesReceived) {
149 this.bytesReceived = bytesReceived;
150 }
151
152 /**
153 * Gets the remote addr.
154 *
155 * @return the remote addr
156 */
157 public String getRemoteAddr() {
158 return remoteAddr;
159 }
160
161 /**
162 * Sets the remote addr.
163 *
164 * @param remoteAddr the new remote addr
165 */
166 public void setRemoteAddr(String remoteAddr) {
167 this.remoteAddr = remoteAddr;
168 }
169
170 /**
171 * Gets the virtual host.
172 *
173 * @return the virtual host
174 */
175 public String getVirtualHost() {
176 return virtualHost;
177 }
178
179 /**
180 * Sets the virtual host.
181 *
182 * @param virtualHost the new virtual host
183 */
184 public void setVirtualHost(String virtualHost) {
185 this.virtualHost = virtualHost;
186 }
187
188 /**
189 * Gets the method.
190 *
191 * @return the method
192 */
193 public String getMethod() {
194 return method;
195 }
196
197 /**
198 * Sets the method.
199 *
200 * @param method the new method
201 */
202 public void setMethod(String method) {
203 this.method = method;
204 }
205
206 /**
207 * Gets the current uri.
208 *
209 * @return the current uri
210 */
211 public String getCurrentUri() {
212 return currentUri;
213 }
214
215 /**
216 * Sets the current uri.
217 *
218 * @param currentUri the new current uri
219 */
220 public void setCurrentUri(String currentUri) {
221 this.currentUri = currentUri;
222 }
223
224 /**
225 * Gets the current query string.
226 *
227 * @return the current query string
228 */
229 public String getCurrentQueryString() {
230 return currentQueryString;
231 }
232
233 /**
234 * Sets the current query string.
235 *
236 * @param currentQueryString the new current query string
237 */
238 public void setCurrentQueryString(String currentQueryString) {
239 this.currentQueryString = currentQueryString;
240 }
241
242 /**
243 * Gets the protocol.
244 *
245 * @return the protocol
246 */
247 public String getProtocol() {
248 return protocol;
249 }
250
251 /**
252 * Sets the protocol.
253 *
254 * @param protocol the new protocol
255 */
256 public void setProtocol(String protocol) {
257 this.protocol = protocol;
258 }
259
260 /**
261 * Gets the remote addr locale.
262 *
263 * @return the remote addr locale
264 */
265 public Locale getRemoteAddrLocale() {
266 return remoteAddrLocale;
267 }
268
269 /**
270 * Sets the remote addr locale.
271 *
272 * @param remoteAddrLocale the new remote addr locale
273 */
274 public void setRemoteAddrLocale(Locale remoteAddrLocale) {
275 this.remoteAddrLocale = remoteAddrLocale;
276 }
277
278 /**
279 * Gets the worker thread name.
280 *
281 * @return the worker thread name
282 */
283 public String getWorkerThreadName() {
284 return workerThreadName;
285 }
286
287 /**
288 * Sets the worker thread name.
289 *
290 * @param workerThreadName the new worker thread name
291 */
292 public void setWorkerThreadName(String workerThreadName) {
293 this.workerThreadName = workerThreadName;
294 }
295
296 /**
297 * Checks if is worker thread name supported.
298 *
299 * @return true, if is worker thread name supported
300 */
301 public boolean isWorkerThreadNameSupported() {
302 return workerThreadNameSupported;
303 }
304
305 /**
306 * Sets the worker thread name supported.
307 *
308 * @param workerThreadNameSupported the new worker thread name supported
309 */
310 public void setWorkerThreadNameSupported(boolean workerThreadNameSupported) {
311 this.workerThreadNameSupported = workerThreadNameSupported;
312 }
313
314 }