1 17 18 19 package org.apache.catalina; 20 21 22 import java.util.EventObject ; 23 import javax.servlet.Filter ; 24 import javax.servlet.Servlet ; 25 import javax.servlet.ServletRequest ; 26 import javax.servlet.ServletResponse ; 27 28 29 37 38 public final class InstanceEvent 39 extends EventObject { 40 41 42 44 45 49 public static final String BEFORE_INIT_EVENT = "beforeInit"; 50 51 52 55 public static final String AFTER_INIT_EVENT = "afterInit"; 56 57 58 65 public static final String BEFORE_SERVICE_EVENT = "beforeService"; 66 67 68 75 public static final String AFTER_SERVICE_EVENT = "afterService"; 76 77 78 82 public static final String BEFORE_DESTROY_EVENT = "beforeDestroy"; 83 84 85 89 public static final String AFTER_DESTROY_EVENT = "afterDestroy"; 90 91 92 101 public static final String BEFORE_DISPATCH_EVENT = "beforeDispatch"; 102 103 104 113 public static final String AFTER_DISPATCH_EVENT = "afterDispatch"; 114 115 116 123 public static final String BEFORE_FILTER_EVENT = "beforeFilter"; 124 125 126 133 public static final String AFTER_FILTER_EVENT = "afterFilter"; 134 135 136 138 139 147 public InstanceEvent(Wrapper wrapper, Filter filter, String type) { 148 149 super(wrapper); 150 this.wrapper = wrapper; 151 this.filter = filter; 152 this.servlet = null; 153 this.type = type; 154 155 } 156 157 158 167 public InstanceEvent(Wrapper wrapper, Filter filter, String type, 168 Throwable exception) { 169 170 super(wrapper); 171 this.wrapper = wrapper; 172 this.filter = filter; 173 this.servlet = null; 174 this.type = type; 175 this.exception = exception; 176 177 } 178 179 180 190 public InstanceEvent(Wrapper wrapper, Filter filter, String type, 191 ServletRequest request, ServletResponse response) { 192 193 super(wrapper); 194 this.wrapper = wrapper; 195 this.filter = filter; 196 this.servlet = null; 197 this.type = type; 198 this.request = request; 199 this.response = response; 200 201 } 202 203 204 215 public InstanceEvent(Wrapper wrapper, Filter filter, String type, 216 ServletRequest request, ServletResponse response, 217 Throwable exception) { 218 219 super(wrapper); 220 this.wrapper = wrapper; 221 this.filter = filter; 222 this.servlet = null; 223 this.type = type; 224 this.request = request; 225 this.response = response; 226 this.exception = exception; 227 228 } 229 230 231 239 public InstanceEvent(Wrapper wrapper, Servlet servlet, String type) { 240 241 super(wrapper); 242 this.wrapper = wrapper; 243 this.filter = null; 244 this.servlet = servlet; 245 this.type = type; 246 247 } 248 249 250 259 public InstanceEvent(Wrapper wrapper, Servlet servlet, String type, 260 Throwable exception) { 261 262 super(wrapper); 263 this.wrapper = wrapper; 264 this.filter = null; 265 this.servlet = servlet; 266 this.type = type; 267 this.exception = exception; 268 269 } 270 271 272 282 public InstanceEvent(Wrapper wrapper, Servlet servlet, String type, 283 ServletRequest request, ServletResponse response) { 284 285 super(wrapper); 286 this.wrapper = wrapper; 287 this.filter = null; 288 this.servlet = servlet; 289 this.type = type; 290 this.request = request; 291 this.response = response; 292 293 } 294 295 296 307 public InstanceEvent(Wrapper wrapper, Servlet servlet, String type, 308 ServletRequest request, ServletResponse response, 309 Throwable exception) { 310 311 super(wrapper); 312 this.wrapper = wrapper; 313 this.filter = null; 314 this.servlet = servlet; 315 this.type = type; 316 this.request = request; 317 this.response = response; 318 this.exception = exception; 319 320 } 321 322 323 325 326 331 private Throwable exception = null; 332 333 334 338 private Filter filter = null; 339 340 341 345 private ServletRequest request = null; 346 347 348 352 private ServletResponse response = null; 353 354 355 359 private Servlet servlet = null; 360 361 362 365 private String type = null; 366 367 368 371 private Wrapper wrapper = null; 372 373 374 376 377 381 public Throwable getException() { 382 383 return (this.exception); 384 385 } 386 387 388 391 public Filter getFilter() { 392 393 return (this.filter); 394 395 } 396 397 398 401 public ServletRequest getRequest() { 402 403 return (this.request); 404 405 } 406 407 408 411 public ServletResponse getResponse() { 412 413 return (this.response); 414 415 } 416 417 418 421 public Servlet getServlet() { 422 423 return (this.servlet); 424 425 } 426 427 428 431 public String getType() { 432 433 return (this.type); 434 435 } 436 437 438 442 public Wrapper getWrapper() { 443 444 return (this.wrapper); 445 446 } 447 448 449 } 450 | Popular Tags |