KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > portletcontainer > impl > portletAPIImp > helpers > HttpSessionWrapper


1 /*
2  * Copyright 2001-2003 The eXo platform SARL All rights reserved.
3  * Please look at license.txt in info directory for more license detail.
4  *
5  * Created on 1 d�c. 2003
6  */

7 package org.exoplatform.services.portletcontainer.impl.portletAPIImp.helpers;
8
9 import java.util.Enumeration JavaDoc;
10
11 import javax.servlet.ServletContext JavaDoc;
12 import javax.servlet.http.HttpSession JavaDoc;
13 import javax.servlet.http.HttpSessionContext JavaDoc;
14
15 /**
16  * @author Mestrallet Benjamin
17  * benjmestrallet@users.sourceforge.net
18  */

19 public class HttpSessionWrapper implements HttpSession JavaDoc{
20   
21   private HttpSession JavaDoc session;
22
23   public HttpSessionWrapper(HttpSession JavaDoc session){
24     this.session = session;
25   }
26
27   public long getCreationTime() {
28     return session.getCreationTime();
29   }
30
31   public String JavaDoc getId() {
32     return session.getId();
33   }
34
35   public long getLastAccessedTime() {
36     return session.getLastAccessedTime();
37   }
38
39   public ServletContext JavaDoc getServletContext() {
40     return session.getServletContext();
41   }
42
43   public void setMaxInactiveInterval(int arg0) {
44     session.setMaxInactiveInterval(arg0);
45   }
46
47   public int getMaxInactiveInterval() {
48     return session.getMaxInactiveInterval();
49   }
50
51   public HttpSessionContext JavaDoc getSessionContext() {
52     return session.getSessionContext();
53   }
54
55   public Object JavaDoc getAttribute(String JavaDoc arg0) {
56     return session.getAttribute(arg0);
57   }
58
59   public Object JavaDoc getValue(String JavaDoc arg0) {
60     return session.getValue(arg0);
61   }
62
63   public Enumeration JavaDoc getAttributeNames() {
64     return session.getAttributeNames();
65   }
66
67   public String JavaDoc[] getValueNames() {
68     return session.getValueNames();
69   }
70
71   public void setAttribute(String JavaDoc arg0, Object JavaDoc arg1) {
72     session.setAttribute(arg0, arg1);
73   }
74
75   public void putValue(String JavaDoc arg0, Object JavaDoc arg1) {
76     session.putValue(arg0, arg1);
77   }
78
79   public void removeAttribute(String JavaDoc arg0) {
80     session.removeAttribute(arg0);
81   }
82
83   public void removeValue(String JavaDoc arg0) {
84     session.removeValue(arg0);
85   }
86
87   public void invalidate() {
88     session.invalidate();
89   }
90
91   public boolean isNew() {
92     return session.isNew();
93   }
94
95   public HttpSession JavaDoc getSession() {
96     return session;
97   }
98
99   public void setSession(HttpSession JavaDoc session) {
100     this.session = session;
101   }
102
103 }
104
Popular Tags