Source Code Cross Referenced for MockHttpServletRequest.java in  » Net » Terracotta » javax » servlet » http » 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 » Net » Terracotta » javax.servlet.http 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice.  All rights reserved.
003:         */
004:        package javax.servlet.http;
005:
006:        import com.tc.exception.ImplementMe;
007:
008:        import java.io.BufferedReader;
009:        import java.security.Principal;
010:        import java.util.Enumeration;
011:        import java.util.Locale;
012:        import java.util.Map;
013:
014:        import javax.servlet.RequestDispatcher;
015:        import javax.servlet.ServletInputStream;
016:
017:        public class MockHttpServletRequest implements  HttpServletRequest {
018:
019:            private final String contextPath;
020:            private String requestUrl;
021:            private HttpSession session;
022:            private String requestedSessionId;
023:            private boolean sidFromCookie;
024:            private boolean sidValid;
025:            private String scheme;
026:            private String serverName;
027:            private int serverPort;
028:
029:            public MockHttpServletRequest() {
030:                this .contextPath = "/";
031:            }
032:
033:            public MockHttpServletRequest(String contextPath,
034:                    String requestedSessionId) {
035:                this .contextPath = contextPath;
036:                this .requestedSessionId = requestedSessionId;
037:            }
038:
039:            public void setSession(HttpSession session) {
040:                this .session = session;
041:            }
042:
043:            public void setRequestedSessionId(String requestedSessionId) {
044:                this .requestedSessionId = requestedSessionId;
045:            }
046:
047:            public void setRequestUrl(String requestUrl) {
048:                this .requestUrl = requestUrl;
049:            }
050:
051:            public void setSidFromCookie(boolean sidFromCookie) {
052:                this .sidFromCookie = sidFromCookie;
053:            }
054:
055:            public void setSidValid(boolean sidValid) {
056:                this .sidValid = sidValid;
057:            }
058:
059:            public void setScheme(String scheme) {
060:                this .scheme = scheme;
061:            }
062:
063:            public void setServerName(String serverName) {
064:                this .serverName = serverName;
065:            }
066:
067:            public void setServerPort(int serverPort) {
068:                this .serverPort = serverPort;
069:            }
070:
071:            public String getAuthType() {
072:                throw new ImplementMe();
073:            }
074:
075:            public String getContextPath() {
076:                return contextPath;
077:            }
078:
079:            public Cookie[] getCookies() {
080:                throw new ImplementMe();
081:            }
082:
083:            public long getDateHeader(String arg0) {
084:                throw new ImplementMe();
085:            }
086:
087:            public String getHeader(String arg0) {
088:                throw new ImplementMe();
089:            }
090:
091:            public Enumeration getHeaderNames() {
092:                throw new ImplementMe();
093:            }
094:
095:            public Enumeration getHeaders(String arg0) {
096:                throw new ImplementMe();
097:            }
098:
099:            public int getIntHeader(String arg0) {
100:                throw new ImplementMe();
101:            }
102:
103:            public String getMethod() {
104:                throw new ImplementMe();
105:            }
106:
107:            public String getPathInfo() {
108:                throw new ImplementMe();
109:            }
110:
111:            public String getPathTranslated() {
112:                throw new ImplementMe();
113:            }
114:
115:            public String getQueryString() {
116:                throw new ImplementMe();
117:            }
118:
119:            public String getRemoteUser() {
120:                throw new ImplementMe();
121:            }
122:
123:            public String getRequestURI() {
124:                throw new ImplementMe();
125:            }
126:
127:            public StringBuffer getRequestURL() {
128:                return new StringBuffer(requestUrl);
129:            }
130:
131:            public String getRequestedSessionId() {
132:                throw new ImplementMe();
133:            }
134:
135:            public String getServletPath() {
136:                throw new ImplementMe();
137:            }
138:
139:            public HttpSession getSession() {
140:                return getSession(true);
141:            }
142:
143:            public HttpSession getSession(boolean create) {
144:                if (!create && requestedSessionId == null)
145:                    return session;
146:                if (session == null)
147:                    session = new MockHttpSession(requestedSessionId);
148:                return session;
149:            }
150:
151:            public Principal getUserPrincipal() {
152:                throw new ImplementMe();
153:            }
154:
155:            public boolean isRequestedSessionIdFromCookie() {
156:                return sidFromCookie;
157:            }
158:
159:            public boolean isRequestedSessionIdFromURL() {
160:                return !sidFromCookie;
161:            }
162:
163:            public boolean isRequestedSessionIdFromUrl() {
164:                return isRequestedSessionIdFromURL();
165:            }
166:
167:            public boolean isRequestedSessionIdValid() {
168:                return sidValid;
169:            }
170:
171:            public boolean isUserInRole(String arg0) {
172:                throw new ImplementMe();
173:            }
174:
175:            public Object getAttribute(String arg0) {
176:                throw new ImplementMe();
177:            }
178:
179:            public Enumeration getAttributeNames() {
180:                throw new ImplementMe();
181:            }
182:
183:            public String getCharacterEncoding() {
184:                throw new ImplementMe();
185:            }
186:
187:            public int getContentLength() {
188:                throw new ImplementMe();
189:            }
190:
191:            public String getContentType() {
192:                throw new ImplementMe();
193:            }
194:
195:            public ServletInputStream getInputStream() {
196:                throw new ImplementMe();
197:            }
198:
199:            public String getLocalAddr() {
200:                throw new ImplementMe();
201:            }
202:
203:            public String getLocalName() {
204:                throw new ImplementMe();
205:            }
206:
207:            public int getLocalPort() {
208:                throw new ImplementMe();
209:            }
210:
211:            public Locale getLocale() {
212:                throw new ImplementMe();
213:            }
214:
215:            public Enumeration getLocales() {
216:                throw new ImplementMe();
217:            }
218:
219:            public String getParameter(String arg0) {
220:                throw new ImplementMe();
221:            }
222:
223:            public Map getParameterMap() {
224:                throw new ImplementMe();
225:            }
226:
227:            public Enumeration getParameterNames() {
228:                throw new ImplementMe();
229:            }
230:
231:            public String[] getParameterValues(String arg0) {
232:                throw new ImplementMe();
233:            }
234:
235:            public String getProtocol() {
236:                throw new ImplementMe();
237:            }
238:
239:            public BufferedReader getReader() {
240:                throw new ImplementMe();
241:            }
242:
243:            public String getRealPath(String arg0) {
244:                throw new ImplementMe();
245:            }
246:
247:            public String getRemoteAddr() {
248:                throw new ImplementMe();
249:            }
250:
251:            public String getRemoteHost() {
252:                throw new ImplementMe();
253:            }
254:
255:            public int getRemotePort() {
256:                throw new ImplementMe();
257:            }
258:
259:            public RequestDispatcher getRequestDispatcher(String arg0) {
260:                throw new ImplementMe();
261:            }
262:
263:            public String getScheme() {
264:                return scheme;
265:            }
266:
267:            public String getServerName() {
268:                return serverName;
269:            }
270:
271:            public int getServerPort() {
272:                return serverPort;
273:            }
274:
275:            public boolean isSecure() {
276:                throw new ImplementMe();
277:            }
278:
279:            public void removeAttribute(String arg0) {
280:                throw new ImplementMe();
281:
282:            }
283:
284:            public void setAttribute(String arg0, Object arg1) {
285:                throw new ImplementMe();
286:
287:            }
288:
289:            public void setCharacterEncoding(String arg0) {
290:                throw new ImplementMe();
291:
292:            }
293:
294:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.