Source Code Cross Referenced for HttpServletRequestWrapper.java in  » 6.0-JDK-Core » Servlet-API-by-tomcat » javax » servlet » http » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
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
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » Servlet API by tomcat » javax.servlet.http 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001        /*
002         * Copyright 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        package javax.servlet.http;
017
018        import javax.servlet.ServletRequestWrapper;
019        import java.util.Enumeration;
020
021        /**
022         * 
023         * Provides a convenient implementation of the HttpServletRequest interface that
024         * can be subclassed by developers wishing to adapt the request to a Servlet.
025         * This class implements the Wrapper or Decorator pattern. Methods default to
026         * calling through to the wrapped request object.
027         * 
028         *
029         * @see 	javax.servlet.http.HttpServletRequest
030         * @since	v 2.3
031         *
032         */
033
034        public class HttpServletRequestWrapper extends ServletRequestWrapper
035                implements  HttpServletRequest {
036
037            /** 
038             * Constructs a request object wrapping the given request.
039             * @throws java.lang.IllegalArgumentException if the request is null
040             */
041            public HttpServletRequestWrapper(HttpServletRequest request) {
042                super (request);
043            }
044
045            private HttpServletRequest _getHttpServletRequest() {
046                return (HttpServletRequest) super .getRequest();
047            }
048
049            /**
050             * The default behavior of this method is to return getAuthType()
051             * on the wrapped request object.
052             */
053
054            public String getAuthType() {
055                return this ._getHttpServletRequest().getAuthType();
056            }
057
058            /**
059             * The default behavior of this method is to return getCookies()
060             * on the wrapped request object.
061             */
062            public Cookie[] getCookies() {
063                return this ._getHttpServletRequest().getCookies();
064            }
065
066            /**
067             * The default behavior of this method is to return getDateHeader(String name)
068             * on the wrapped request object.
069             */
070            public long getDateHeader(String name) {
071                return this ._getHttpServletRequest().getDateHeader(name);
072            }
073
074            /**
075             * The default behavior of this method is to return getHeader(String name)
076             * on the wrapped request object.
077             */
078            public String getHeader(String name) {
079                return this ._getHttpServletRequest().getHeader(name);
080            }
081
082            /**
083             * The default behavior of this method is to return getHeaders(String name)
084             * on the wrapped request object.
085             */
086            public Enumeration getHeaders(String name) {
087                return this ._getHttpServletRequest().getHeaders(name);
088            }
089
090            /**
091             * The default behavior of this method is to return getHeaderNames()
092             * on the wrapped request object.
093             */
094
095            public Enumeration getHeaderNames() {
096                return this ._getHttpServletRequest().getHeaderNames();
097            }
098
099            /**
100             * The default behavior of this method is to return getIntHeader(String name)
101             * on the wrapped request object.
102             */
103
104            public int getIntHeader(String name) {
105                return this ._getHttpServletRequest().getIntHeader(name);
106            }
107
108            /**
109             * The default behavior of this method is to return getMethod()
110             * on the wrapped request object.
111             */
112            public String getMethod() {
113                return this ._getHttpServletRequest().getMethod();
114            }
115
116            /**
117             * The default behavior of this method is to return getPathInfo()
118             * on the wrapped request object.
119             */
120            public String getPathInfo() {
121                return this ._getHttpServletRequest().getPathInfo();
122            }
123
124            /**
125             * The default behavior of this method is to return getPathTranslated()
126             * on the wrapped request object.
127             */
128
129            public String getPathTranslated() {
130                return this ._getHttpServletRequest().getPathTranslated();
131            }
132
133            /**
134             * The default behavior of this method is to return getContextPath()
135             * on the wrapped request object.
136             */
137            public String getContextPath() {
138                return this ._getHttpServletRequest().getContextPath();
139            }
140
141            /**
142             * The default behavior of this method is to return getQueryString()
143             * on the wrapped request object.
144             */
145            public String getQueryString() {
146                return this ._getHttpServletRequest().getQueryString();
147            }
148
149            /**
150             * The default behavior of this method is to return getRemoteUser()
151             * on the wrapped request object.
152             */
153            public String getRemoteUser() {
154                return this ._getHttpServletRequest().getRemoteUser();
155            }
156
157            /**
158             * The default behavior of this method is to return isUserInRole(String role)
159             * on the wrapped request object.
160             */
161            public boolean isUserInRole(String role) {
162                return this ._getHttpServletRequest().isUserInRole(role);
163            }
164
165            /**
166             * The default behavior of this method is to return getUserPrincipal()
167             * on the wrapped request object.
168             */
169            public java.security.Principal getUserPrincipal() {
170                return this ._getHttpServletRequest().getUserPrincipal();
171            }
172
173            /**
174             * The default behavior of this method is to return getRequestedSessionId()
175             * on the wrapped request object.
176             */
177            public String getRequestedSessionId() {
178                return this ._getHttpServletRequest().getRequestedSessionId();
179            }
180
181            /**
182             * The default behavior of this method is to return getRequestURI()
183             * on the wrapped request object.
184             */
185            public String getRequestURI() {
186                return this ._getHttpServletRequest().getRequestURI();
187            }
188
189            /**
190             * The default behavior of this method is to return getRequestURL()
191             * on the wrapped request object.
192             */
193            public StringBuffer getRequestURL() {
194                return this ._getHttpServletRequest().getRequestURL();
195            }
196
197            /**
198             * The default behavior of this method is to return getServletPath()
199             * on the wrapped request object.
200             */
201            public String getServletPath() {
202                return this ._getHttpServletRequest().getServletPath();
203            }
204
205            /**
206             * The default behavior of this method is to return getSession(boolean create)
207             * on the wrapped request object.
208             */
209            public HttpSession getSession(boolean create) {
210                return this ._getHttpServletRequest().getSession(create);
211            }
212
213            /**
214             * The default behavior of this method is to return getSession()
215             * on the wrapped request object.
216             */
217            public HttpSession getSession() {
218                return this ._getHttpServletRequest().getSession();
219            }
220
221            /**
222             * The default behavior of this method is to return isRequestedSessionIdValid()
223             * on the wrapped request object.
224             */
225
226            public boolean isRequestedSessionIdValid() {
227                return this ._getHttpServletRequest()
228                        .isRequestedSessionIdValid();
229            }
230
231            /**
232             * The default behavior of this method is to return isRequestedSessionIdFromCookie()
233             * on the wrapped request object.
234             */
235            public boolean isRequestedSessionIdFromCookie() {
236                return this ._getHttpServletRequest()
237                        .isRequestedSessionIdFromCookie();
238            }
239
240            /**
241             * The default behavior of this method is to return isRequestedSessionIdFromURL()
242             * on the wrapped request object.
243             */
244            public boolean isRequestedSessionIdFromURL() {
245                return this ._getHttpServletRequest()
246                        .isRequestedSessionIdFromURL();
247            }
248
249            /**
250             * The default behavior of this method is to return isRequestedSessionIdFromUrl()
251             * on the wrapped request object.
252             */
253            public boolean isRequestedSessionIdFromUrl() {
254                return this._getHttpServletRequest()
255                        .isRequestedSessionIdFromUrl();
256            }
257
258        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.