Source Code Cross Referenced for RequestFacade.java in  » Sevlet-Container » tomcat-catalina » org » apache » catalina » connector » 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.connector 
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.connector;
018:
019:        import java.io.BufferedReader;
020:        import java.io.IOException;
021:        import java.util.Enumeration;
022:        import java.util.Locale;
023:        import java.util.Map;
024:
025:        import javax.servlet.RequestDispatcher;
026:        import javax.servlet.ServletInputStream;
027:        import javax.servlet.ServletRequest;
028:
029:        import org.apache.catalina.Request;
030:
031:        /**
032:         * Facade class that wraps a Catalina-internal <b>Request</b>
033:         * object.  All methods are delegated to the wrapped request.
034:         *
035:         * @author Craig R. McClanahan
036:         * @author Remy Maucherat
037:         * @author Jean-Francois Arcand
038:         * @version $Revision: 1.4 $ $Date: 2004/02/27 14:58:41 $
039:         */
040:
041:        public class RequestFacade implements  ServletRequest {
042:
043:            // ----------------------------------------------------------- Constructors
044:
045:            /**
046:             * Construct a wrapper for the specified request.
047:             *
048:             * @param request The request to be wrapped
049:             */
050:            public RequestFacade(Request request) {
051:
052:                super ();
053:                this .request = (ServletRequest) request;
054:
055:            }
056:
057:            // ----------------------------------------------------- Instance Variables
058:
059:            /**
060:             * The wrapped request.
061:             */
062:            protected ServletRequest request = null;
063:
064:            // --------------------------------------------------------- Public Methods
065:
066:            /**
067:             * Clear facade.
068:             */
069:            public void clear() {
070:                request = null;
071:            }
072:
073:            // ------------------------------------------------- ServletRequest Methods
074:
075:            public Object getAttribute(String name) {
076:                return request.getAttribute(name);
077:            }
078:
079:            public Enumeration getAttributeNames() {
080:                return request.getAttributeNames();
081:            }
082:
083:            public String getCharacterEncoding() {
084:                return request.getCharacterEncoding();
085:            }
086:
087:            public void setCharacterEncoding(String env)
088:                    throws java.io.UnsupportedEncodingException {
089:                request.setCharacterEncoding(env);
090:            }
091:
092:            public int getContentLength() {
093:                return request.getContentLength();
094:            }
095:
096:            public String getContentType() {
097:                return request.getContentType();
098:            }
099:
100:            public ServletInputStream getInputStream() throws IOException {
101:                return request.getInputStream();
102:            }
103:
104:            public String getParameter(String name) {
105:                return request.getParameter(name);
106:            }
107:
108:            public Enumeration getParameterNames() {
109:                return request.getParameterNames();
110:            }
111:
112:            public String[] getParameterValues(String name) {
113:                return request.getParameterValues(name);
114:            }
115:
116:            public Map getParameterMap() {
117:                return request.getParameterMap();
118:            }
119:
120:            public String getProtocol() {
121:                return request.getProtocol();
122:            }
123:
124:            public String getScheme() {
125:                return request.getScheme();
126:            }
127:
128:            public String getServerName() {
129:                return request.getServerName();
130:            }
131:
132:            public int getServerPort() {
133:                return request.getServerPort();
134:            }
135:
136:            public BufferedReader getReader() throws IOException {
137:                return request.getReader();
138:            }
139:
140:            public String getRemoteAddr() {
141:                return request.getRemoteAddr();
142:            }
143:
144:            public String getRemoteHost() {
145:                return request.getRemoteHost();
146:            }
147:
148:            public void setAttribute(String name, Object o) {
149:                request.setAttribute(name, o);
150:            }
151:
152:            public void removeAttribute(String name) {
153:                request.removeAttribute(name);
154:            }
155:
156:            public Locale getLocale() {
157:                return request.getLocale();
158:            }
159:
160:            public Enumeration getLocales() {
161:                return request.getLocales();
162:            }
163:
164:            public boolean isSecure() {
165:                return request.isSecure();
166:            }
167:
168:            public RequestDispatcher getRequestDispatcher(String path) {
169:                // TODO : Facade !!
170:                return request.getRequestDispatcher(path);
171:            }
172:
173:            public String getRealPath(String path) {
174:                return request.getRealPath(path);
175:            }
176:
177:            /**
178:             * Returns the Internet Protocol (IP) source port of the client
179:             * or last proxy that sent the request.
180:             */
181:            public int getRemotePort() {
182:                return request.getRemotePort();
183:            }
184:
185:            /**
186:             * Returns the host name of the Internet Protocol (IP) interface on
187:             * which the request was received.
188:             */
189:            public String getLocalName() {
190:                return request.getLocalName();
191:            }
192:
193:            /**
194:             * Returns the Internet Protocol (IP) address of the interface on
195:             * which the request  was received.
196:             */
197:            public String getLocalAddr() {
198:                return request.getLocalAddr();
199:            }
200:
201:            /**
202:             * Returns the Internet Protocol (IP) port number of the interface
203:             * on which the request was received.
204:             */
205:            public int getLocalPort() {
206:                return request.getLocalPort();
207:            }
208:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.