KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icesoft > faces > webapp > http > servlet > ServletSessionMap


1 package com.icesoft.faces.webapp.http.servlet;
2
3 import com.icesoft.faces.context.AbstractAttributeMap;
4
5 import javax.servlet.http.HttpSession JavaDoc;
6 import java.util.Enumeration JavaDoc;
7
8 public class ServletSessionMap extends AbstractAttributeMap {
9     private final HttpSession JavaDoc httpSession;
10
11     public ServletSessionMap(HttpSession JavaDoc httpSession) {
12         this.httpSession = httpSession;
13     }
14
15     /*
16       * @see com.icesoft.faces.context.AbstractAttributeMap#getAttribute(java.lang.String)
17       */

18     protected Object JavaDoc getAttribute(String JavaDoc key) {
19         return httpSession.getAttribute(key);
20     }
21
22     /*
23       * @see com.icesoft.faces.context.AbstractAttributeMap#setAttribute(java.lang.String, java.lang.Object)
24       */

25     protected void setAttribute(String JavaDoc key, Object JavaDoc value) {
26         httpSession.setAttribute(key, value);
27     }
28
29     /*
30       * @see com.icesoft.faces.context.AbstractAttributeMap#removeAttribute(java.lang.String)
31       */

32     protected void removeAttribute(String JavaDoc key) {
33         httpSession.removeAttribute(key);
34     }
35
36     /*
37       * @see com.icesoft.faces.context.AbstractAttributeMap#getAttributeNames()
38       */

39     protected Enumeration JavaDoc getAttributeNames() {
40         return httpSession.getAttributeNames();
41     }
42
43 }
44
Popular Tags