This project has retired. For details please refer to its
Attic page.
MockHttpServletRequest xref
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.juddi.auth;
17
18 import java.io.BufferedReader;
19 import java.io.IOException;
20 import java.io.UnsupportedEncodingException;
21 import java.security.Principal;
22 import java.util.Enumeration;
23 import java.util.Locale;
24 import java.util.Map;
25 import javax.servlet.RequestDispatcher;
26 import javax.servlet.ServletInputStream;
27 import javax.servlet.http.Cookie;
28 import javax.servlet.http.HttpServletRequest;
29 import javax.servlet.http.HttpSession;
30
31
32
33
34
35 public class MockHttpServletRequest implements HttpServletRequest {
36
37 String ip = null;
38
39 public MockHttpServletRequest(String ip) {
40
41 this.ip = ip;
42 }
43
44 @Override
45 public String getAuthType() {
46 throw new UnsupportedOperationException("Not supported yet.");
47 }
48
49 @Override
50 public Cookie[] getCookies() {
51 throw new UnsupportedOperationException("Not supported yet.");
52 }
53
54 @Override
55 public long getDateHeader(String string) {
56 throw new UnsupportedOperationException("Not supported yet.");
57 }
58
59 @Override
60 public String getHeader(String string) {
61 throw new UnsupportedOperationException("Not supported yet.");
62 }
63
64 @Override
65 public Enumeration getHeaders(String string) {
66 throw new UnsupportedOperationException("Not supported yet.");
67 }
68
69 @Override
70 public Enumeration getHeaderNames() {
71 throw new UnsupportedOperationException("Not supported yet.");
72 }
73
74 @Override
75 public int getIntHeader(String string) {
76 throw new UnsupportedOperationException("Not supported yet.");
77 }
78
79 @Override
80 public String getMethod() {
81 throw new UnsupportedOperationException("Not supported yet.");
82 }
83
84 @Override
85 public String getPathInfo() {
86 throw new UnsupportedOperationException("Not supported yet.");
87 }
88
89 @Override
90 public String getPathTranslated() {
91 throw new UnsupportedOperationException("Not supported yet.");
92 }
93
94 @Override
95 public String getContextPath() {
96 throw new UnsupportedOperationException("Not supported yet.");
97 }
98
99 @Override
100 public String getQueryString() {
101 throw new UnsupportedOperationException("Not supported yet.");
102 }
103
104 @Override
105 public String getRemoteUser() {
106 throw new UnsupportedOperationException("Not supported yet.");
107 }
108
109 @Override
110 public boolean isUserInRole(String string) {
111 throw new UnsupportedOperationException("Not supported yet.");
112 }
113
114 @Override
115 public Principal getUserPrincipal() {
116 throw new UnsupportedOperationException("Not supported yet.");
117 }
118
119 @Override
120 public String getRequestedSessionId() {
121 throw new UnsupportedOperationException("Not supported yet.");
122 }
123
124 @Override
125 public String getRequestURI() {
126 throw new UnsupportedOperationException("Not supported yet.");
127 }
128
129 @Override
130 public StringBuffer getRequestURL() {
131 throw new UnsupportedOperationException("Not supported yet.");
132 }
133
134 @Override
135 public String getServletPath() {
136 throw new UnsupportedOperationException("Not supported yet.");
137 }
138
139 @Override
140 public HttpSession getSession(boolean bln) {
141 throw new UnsupportedOperationException("Not supported yet.");
142 }
143
144 @Override
145 public HttpSession getSession() {
146 throw new UnsupportedOperationException("Not supported yet.");
147 }
148
149 @Override
150 public boolean isRequestedSessionIdValid() {
151 throw new UnsupportedOperationException("Not supported yet.");
152 }
153
154 @Override
155 public boolean isRequestedSessionIdFromCookie() {
156 throw new UnsupportedOperationException("Not supported yet.");
157 }
158
159 @Override
160 public boolean isRequestedSessionIdFromURL() {
161 throw new UnsupportedOperationException("Not supported yet.");
162 }
163
164 @Override
165 public boolean isRequestedSessionIdFromUrl() {
166 throw new UnsupportedOperationException("Not supported yet.");
167 }
168
169 @Override
170 public Object getAttribute(String string) {
171 throw new UnsupportedOperationException("Not supported yet.");
172 }
173
174 @Override
175 public Enumeration getAttributeNames() {
176 throw new UnsupportedOperationException("Not supported yet.");
177 }
178
179 @Override
180 public String getCharacterEncoding() {
181 throw new UnsupportedOperationException("Not supported yet.");
182 }
183
184 @Override
185 public void setCharacterEncoding(String string) throws UnsupportedEncodingException {
186 throw new UnsupportedOperationException("Not supported yet.");
187 }
188
189 @Override
190 public int getContentLength() {
191 throw new UnsupportedOperationException("Not supported yet.");
192 }
193
194 @Override
195 public String getContentType() {
196 throw new UnsupportedOperationException("Not supported yet.");
197 }
198
199 @Override
200 public ServletInputStream getInputStream() throws IOException {
201 throw new UnsupportedOperationException("Not supported yet.");
202 }
203
204 @Override
205 public String getParameter(String string) {
206 throw new UnsupportedOperationException("Not supported yet.");
207 }
208
209 @Override
210 public Enumeration getParameterNames() {
211 throw new UnsupportedOperationException("Not supported yet.");
212 }
213
214 @Override
215 public String[] getParameterValues(String string) {
216 throw new UnsupportedOperationException("Not supported yet.");
217 }
218
219 @Override
220 public Map getParameterMap() {
221 throw new UnsupportedOperationException("Not supported yet.");
222 }
223
224 @Override
225 public String getProtocol() {
226 throw new UnsupportedOperationException("Not supported yet.");
227 }
228
229 @Override
230 public String getScheme() {
231 throw new UnsupportedOperationException("Not supported yet.");
232 }
233
234 @Override
235 public String getServerName() {
236 throw new UnsupportedOperationException("Not supported yet.");
237 }
238
239 @Override
240 public int getServerPort() {
241 throw new UnsupportedOperationException("Not supported yet.");
242 }
243
244 @Override
245 public BufferedReader getReader() throws IOException {
246 throw new UnsupportedOperationException("Not supported yet.");
247 }
248
249 @Override
250 public String getRemoteAddr() {
251 return this.ip;
252 }
253
254 @Override
255 public String getRemoteHost() {
256 throw new UnsupportedOperationException("Not supported yet.");
257 }
258
259 @Override
260 public void setAttribute(String string, Object o) {
261 throw new UnsupportedOperationException("Not supported yet.");
262 }
263
264 @Override
265 public void removeAttribute(String string) {
266 throw new UnsupportedOperationException("Not supported yet.");
267 }
268
269 @Override
270 public Locale getLocale() {
271 throw new UnsupportedOperationException("Not supported yet.");
272 }
273
274 @Override
275 public Enumeration getLocales() {
276 throw new UnsupportedOperationException("Not supported yet.");
277 }
278
279 @Override
280 public boolean isSecure() {
281 throw new UnsupportedOperationException("Not supported yet.");
282 }
283
284 @Override
285 public RequestDispatcher getRequestDispatcher(String string) {
286 throw new UnsupportedOperationException("Not supported yet.");
287 }
288
289 @Override
290 public String getRealPath(String string) {
291 throw new UnsupportedOperationException("Not supported yet.");
292 }
293
294 @Override
295 public int getRemotePort() {
296 throw new UnsupportedOperationException("Not supported yet.");
297 }
298
299 @Override
300 public String getLocalName() {
301 throw new UnsupportedOperationException("Not supported yet.");
302 }
303
304 @Override
305 public String getLocalAddr() {
306 throw new UnsupportedOperationException("Not supported yet.");
307 }
308
309 @Override
310 public int getLocalPort() {
311 throw new UnsupportedOperationException("Not supported yet.");
312 }
313 }