1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.webapp.filter.servlet;
20
21 import java.util.Enumeration;
22 import java.util.Map;
23
24 import javax.servlet.http.HttpServletRequest;
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41 public class RequestHeaderMap extends AbstractAttributeMap
42 {
43 private final HttpServletRequest _httpServletRequest;
44
45 RequestHeaderMap(HttpServletRequest httpServletRequest)
46 {
47 _httpServletRequest = httpServletRequest;
48 }
49
50 protected Object getAttribute(String key)
51 {
52 return _httpServletRequest.getHeader(key);
53 }
54
55 protected void setAttribute(String key, Object value)
56 {
57 throw new UnsupportedOperationException(
58 "Cannot set HttpServletRequest Header");
59 }
60
61 protected void removeAttribute(String key)
62 {
63 throw new UnsupportedOperationException(
64 "Cannot remove HttpServletRequest Header");
65 }
66
67 protected Enumeration getAttributeNames()
68 {
69 return _httpServletRequest.getHeaderNames();
70 }
71
72 public void putAll(Map t)
73 {
74 throw new UnsupportedOperationException();
75 }
76
77
78 public void clear()
79 {
80 throw new UnsupportedOperationException();
81 }
82 }