KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cactus > internal > server > AbstractWebImplicitObjects


1 /*
2  * ========================================================================
3  *
4  * Copyright 2001-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
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 JavaDoc;
23 import javax.servlet.http.HttpServletRequest JavaDoc;
24 import javax.servlet.http.HttpServletResponse JavaDoc;
25
26
27 /**
28  * Holder class that contains the instances of the implicit objects that exist
29  * for all web requests. Namely they are <code>HttpServletRequest</code>,
30  * <code>HttpServletResponse</code> and <code>ServletContext</code>.
31  *
32  * @version $Id: AbstractWebImplicitObjects.java,v 1.1 2004/05/22 11:34:45 vmassol Exp $
33  */

34 public abstract class AbstractWebImplicitObjects implements WebImplicitObjects
35 {
36     /**
37      * The HTTP request object.
38      */

39     protected HttpServletRequest JavaDoc request;
40
41     /**
42      * The HTTP response object.
43      */

44     protected HttpServletResponse JavaDoc response;
45
46     /**
47      * The Context object.
48      */

49     protected ServletContext JavaDoc context;
50
51     /**
52      * @return the <code>ServletContext</code> implicit object
53      */

54     public ServletContext JavaDoc getServletContext()
55     {
56         return this.context;
57     }
58
59     /**
60      * @param theContext the <code>ServletContext</code> implicit object
61      */

62     public void setServletContext(ServletContext JavaDoc theContext)
63     {
64         this.context = theContext;
65     }
66
67     /**
68      * @return the <code>HttpServletResponse</code> implicit object
69      */

70     public HttpServletResponse JavaDoc getHttpServletResponse()
71     {
72         return this.response;
73     }
74
75     /**
76      * @param theResponse the <code>HttpServletResponse</code> implicit object
77      */

78     public void setHttpServletResponse(HttpServletResponse JavaDoc theResponse)
79     {
80         this.response = theResponse;
81     }
82
83     /**
84      * @return the <code>HttpServletRequest</code> implicit object
85      */

86     public HttpServletRequest JavaDoc getHttpServletRequest()
87     {
88         return this.request;
89     }
90
91     /**
92      * @param theRequest the <code>HttpServletRequest</code> implicit object
93      */

94     public void setHttpServletRequest(HttpServletRequest JavaDoc theRequest)
95     {
96         this.request = theRequest;
97     }
98 }
99
Popular Tags