KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > commons > chain > web > WebContext


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.commons.chain.web;
17
18
19 import java.util.Map JavaDoc;
20 import org.apache.commons.chain.impl.ContextBase;
21
22
23 /**
24  * <p>Abstract base implementation of {@link Context} that provides web
25  * based applications that use it a "generic" view of HTTP related requests
26  * and responses, without tying the application to a particular underlying
27  * Java API (such as servlets). It is expected that a concrete subclass
28  * of {@link WebContext} for each API (such as
29  * {@link org.apache.commons.chain.web.servlet.ServletWebContext})
30  * will support adapting that particular API's implementation of request
31  * and response objects into this generic framework.</p>
32  *
33  * <p>The characteristics of a web request/response are made visible via
34  * a series of JavaBeans properties (and mapped to read-only attributes
35  * of the same name, as supported by {@link ContextBase}.</p>
36  *
37  * @author Craig R. McClanahan
38  * @version $Revision: 1.6 $ $Date: 2004/11/30 05:52:23 $
39  */

40
41 public abstract class WebContext extends ContextBase {
42
43
44     // ---------------------------------------------------------- Public Methods
45

46
47     /**
48      * <p>Return a mutable <code>Map</code> that maps application scope
49      * attribute names to their values.</p>
50      */

51     public abstract Map JavaDoc getApplicationScope();
52
53
54     /**
55      * <p>Return an immutable <code>Map</code> that maps header names to
56      * the first (or only) header value (as a String). Header names must
57      * be matched in a case-insensitive manner.</p>
58      */

59     public abstract Map JavaDoc getHeader();
60
61
62     /**
63      * <p>Return an immutable <code>Map</code> that maps header names to
64      * the set of all values specified in the request (as a String array).
65      * Header names must be matched in a case-insensitive manner.</p>
66      */

67     public abstract Map JavaDoc getHeaderValues();
68
69
70     /**
71      * <p>Return an immutable <code>Map</code> that maps context application
72      * initialization parameters to their values.</p>
73      */

74     public abstract Map JavaDoc getInitParam();
75
76
77     /**
78      * <p>Return an immutable <code>Map</code> that maps request parameter
79      * names to the first (or only) value (as a String).</p>
80      */

81     public abstract Map JavaDoc getParam();
82
83
84     /**
85      * <p>Return an immutable <code>Map</code> that maps request parameter
86      * names to the set of all values (as a String array).</p>
87      */

88     public abstract Map JavaDoc getParamValues();
89
90
91     /**
92      * <p>Return a mutable <code>Map</code> that maps request scope
93      * attribute names to their values.</p>
94      */

95     public abstract Map JavaDoc getRequestScope();
96
97
98     /**
99      * <p>Return a mutable <code>Map</code> that maps session scope
100      * attribute names to their values.</p>
101      */

102     public abstract Map JavaDoc getSessionScope();
103
104
105 }
106
Popular Tags