Source Code Cross Referenced for SavedRequest.java in  » Sevlet-Container » tomcat-catalina » org » apache » catalina » authenticator » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » tomcat catalina » org.apache.catalina.authenticator 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 1999,2004 The Apache Software Foundation.
003:         * 
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         * 
008:         *      http://www.apache.org/licenses/LICENSE-2.0
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:
017:        package org.apache.catalina.authenticator;
018:
019:        import java.util.ArrayList;
020:        import java.util.HashMap;
021:        import java.util.Iterator;
022:        import java.util.Locale;
023:
024:        import javax.servlet.http.Cookie;
025:
026:        /**
027:         * Object that saves the critical information from a request so that
028:         * form-based authentication can reproduce it once the user has been
029:         * authenticated.
030:         * <p>
031:         * <b>IMPLEMENTATION NOTE</b> - It is assumed that this object is accessed
032:         * only from the context of a single thread, so no synchronization around
033:         * internal collection classes is performed.
034:         * <p>
035:         * <b>FIXME</b> - Currently, this object has no mechanism to save or
036:         * restore the data content of the request, although it does save
037:         * request parameters so that a POST transaction can be faithfully
038:         * duplicated.
039:         *
040:         * @author Craig R. McClanahan
041:         * @version $Revision: 1.3 $ $Date: 2004/02/27 14:58:41 $
042:         */
043:
044:        public final class SavedRequest {
045:
046:            /**
047:             * The set of Cookies associated with this Request.
048:             */
049:            private ArrayList cookies = new ArrayList();
050:
051:            public void addCookie(Cookie cookie) {
052:                cookies.add(cookie);
053:            }
054:
055:            public Iterator getCookies() {
056:                return (cookies.iterator());
057:            }
058:
059:            /**
060:             * The set of Headers associated with this Request.  Each key is a header
061:             * name, while the value is a ArrayList containing one or more actual
062:             * values for this header.  The values are returned as an Iterator when
063:             * you ask for them.
064:             */
065:            private HashMap headers = new HashMap();
066:
067:            public void addHeader(String name, String value) {
068:                ArrayList values = (ArrayList) headers.get(name);
069:                if (values == null) {
070:                    values = new ArrayList();
071:                    headers.put(name, values);
072:                }
073:                values.add(value);
074:            }
075:
076:            public Iterator getHeaderNames() {
077:                return (headers.keySet().iterator());
078:            }
079:
080:            public Iterator getHeaderValues(String name) {
081:                ArrayList values = (ArrayList) headers.get(name);
082:                if (values == null)
083:                    return ((new ArrayList()).iterator());
084:                else
085:                    return (values.iterator());
086:            }
087:
088:            /**
089:             * The set of Locales associated with this Request.
090:             */
091:            private ArrayList locales = new ArrayList();
092:
093:            public void addLocale(Locale locale) {
094:                locales.add(locale);
095:            }
096:
097:            public Iterator getLocales() {
098:                return (locales.iterator());
099:            }
100:
101:            /**
102:             * The request method used on this Request.
103:             */
104:            private String method = null;
105:
106:            public String getMethod() {
107:                return (this .method);
108:            }
109:
110:            public void setMethod(String method) {
111:                this .method = method;
112:            }
113:
114:            /**
115:             * The set of request parameters associated with this Request.  Each
116:             * entry is keyed by the parameter name, pointing at a String array of
117:             * the corresponding values.
118:             */
119:            private HashMap parameters = new HashMap();
120:
121:            public void addParameter(String name, String values[]) {
122:                parameters.put(name, values);
123:            }
124:
125:            public Iterator getParameterNames() {
126:                return (parameters.keySet().iterator());
127:            }
128:
129:            public String[] getParameterValues(String name) {
130:                return ((String[]) parameters.get(name));
131:            }
132:
133:            /**
134:             * The query string associated with this Request.
135:             */
136:            private String queryString = null;
137:
138:            public String getQueryString() {
139:                return (this .queryString);
140:            }
141:
142:            public void setQueryString(String queryString) {
143:                this .queryString = queryString;
144:            }
145:
146:            /**
147:             * The request URI associated with this Request.
148:             */
149:            private String requestURI = null;
150:
151:            public String getRequestURI() {
152:                return (this .requestURI);
153:            }
154:
155:            public void setRequestURI(String requestURI) {
156:                this.requestURI = requestURI;
157:            }
158:
159:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.