1 7 package com.inversoft.junit.internal.http; 8 9 10 import java.util.Enumeration ; 11 12 import javax.servlet.http.HttpSession ; 13 import javax.servlet.http.HttpSessionContext ; 14 15 16 35 public class HttpSessionWrapper implements HttpSession { 36 37 40 protected HttpSession session; 41 42 43 49 public HttpSessionWrapper(HttpSession session) { 50 this.session = session; 51 } 52 53 54 57 public HttpSession getWrappedSession() { 58 return session; 59 } 60 61 62 public Object getAttribute(String name) { 63 return session.getAttribute(name); 64 } 65 66 67 public Enumeration getAttributeNames() { 68 return session.getAttributeNames(); 69 } 70 71 72 public long getCreationTime() { 73 return session.getCreationTime(); 74 } 75 76 77 public String getId() { 78 return session.getId(); 79 } 80 81 82 public long getLastAccessedTime() { 83 return session.getLastAccessedTime(); 84 } 85 86 87 public int getMaxInactiveInterval() { 88 return session.getMaxInactiveInterval(); 89 } 90 91 92 public javax.servlet.ServletContext getServletContext() { 93 return session.getServletContext(); 94 } 95 96 99 public HttpSessionContext getSessionContext() { 100 return session.getSessionContext(); 101 } 102 103 106 public Object getValue(String name) { 107 return session.getValue(name); 108 } 109 110 113 public String [] getValueNames() { 114 return session.getValueNames(); 115 } 116 117 118 public void invalidate() { 119 session.invalidate(); 120 } 121 122 123 public boolean isNew() { 124 return session.isNew(); 125 } 126 127 130 public void putValue(String name, Object value) { 131 session.putValue(name, value); 132 } 133 134 135 public void removeAttribute(String name) { 136 session.removeAttribute(name); 137 } 138 139 142 public void removeValue(String name) { 143 session.removeValue(name); 144 } 145 146 147 public void setAttribute(String name, Object value) { 148 session.setAttribute(name, value); 149 } 150 151 152 public void setMaxInactiveInterval(int interval) { 153 session.setMaxInactiveInterval(interval); 154 } 155 } 156 | Popular Tags |