1 16 package org.apache.myfaces.context.servlet; 17 18 import java.util.Enumeration ; 19 20 import javax.servlet.http.HttpServletRequest ; 21 22 23 29 public class RequestHeaderMap extends AbstractAttributeMap 30 { 31 private final HttpServletRequest _httpServletRequest; 32 33 RequestHeaderMap(HttpServletRequest httpServletRequest) 34 { 35 _httpServletRequest = httpServletRequest; 36 } 37 38 protected Object getAttribute(String key) 39 { 40 return _httpServletRequest.getHeader(key); 41 } 42 43 protected void setAttribute(String key, Object value) 44 { 45 throw new UnsupportedOperationException ( 46 "Cannot set HttpServletRequest Header"); 47 } 48 49 protected void removeAttribute(String key) 50 { 51 throw new UnsupportedOperationException ( 52 "Cannot remove HttpServletRequest Header"); 53 } 54 55 protected Enumeration getAttributeNames() 56 { 57 return _httpServletRequest.getHeaderNames(); 58 } 59 } 60 | Popular Tags |