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