01: /*
02: * ========================================================================
03: *
04: * Copyright 2001-2004 The Apache Software Foundation.
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: *
18: * ========================================================================
19: */
20: package org.apache.cactus.internal.server;
21:
22: import javax.servlet.ServletContext;
23: import javax.servlet.http.HttpServletRequest;
24: import javax.servlet.http.HttpServletResponse;
25:
26: /**
27: * Holder class that contains the instances of the implicit objects that exist
28: * for all web requests. Namely they are <code>HttpServletRequest</code>,
29: * <code>HttpServletResponse</code> and <code>ServletContext</code>.
30: *
31: * @version $Id: AbstractWebImplicitObjects.java 238991 2004-05-22 11:34:50Z vmassol $
32: */
33: public abstract class AbstractWebImplicitObjects implements
34: WebImplicitObjects {
35: /**
36: * The HTTP request object.
37: */
38: protected HttpServletRequest request;
39:
40: /**
41: * The HTTP response object.
42: */
43: protected HttpServletResponse response;
44:
45: /**
46: * The Context object.
47: */
48: protected ServletContext context;
49:
50: /**
51: * @return the <code>ServletContext</code> implicit object
52: */
53: public ServletContext getServletContext() {
54: return this .context;
55: }
56:
57: /**
58: * @param theContext the <code>ServletContext</code> implicit object
59: */
60: public void setServletContext(ServletContext theContext) {
61: this .context = theContext;
62: }
63:
64: /**
65: * @return the <code>HttpServletResponse</code> implicit object
66: */
67: public HttpServletResponse getHttpServletResponse() {
68: return this .response;
69: }
70:
71: /**
72: * @param theResponse the <code>HttpServletResponse</code> implicit object
73: */
74: public void setHttpServletResponse(HttpServletResponse theResponse) {
75: this .response = theResponse;
76: }
77:
78: /**
79: * @return the <code>HttpServletRequest</code> implicit object
80: */
81: public HttpServletRequest getHttpServletRequest() {
82: return this .request;
83: }
84:
85: /**
86: * @param theRequest the <code>HttpServletRequest</code> implicit object
87: */
88: public void setHttpServletRequest(HttpServletRequest theRequest) {
89: this.request = theRequest;
90: }
91: }
|