1 17 18 19 package org.apache.catalina.session; 20 21 22 import java.util.Enumeration ; 23 24 import javax.servlet.ServletContext ; 25 import javax.servlet.http.HttpSession ; 26 import javax.servlet.http.HttpSessionContext ; 27 28 29 35 36 public class StandardSessionFacade 37 implements HttpSession { 38 39 40 42 43 46 public StandardSessionFacade(StandardSession session) { 47 super(); 48 this.session = (HttpSession ) session; 49 } 50 51 52 55 public StandardSessionFacade(HttpSession session) { 56 super(); 57 this.session = session; 58 } 59 60 61 63 64 67 private HttpSession session = null; 68 69 70 72 73 public long getCreationTime() { 74 return session.getCreationTime(); 75 } 76 77 78 public String getId() { 79 return session.getId(); 80 } 81 82 83 public long getLastAccessedTime() { 84 return session.getLastAccessedTime(); 85 } 86 87 88 public ServletContext getServletContext() { 89 return session.getServletContext(); 91 } 92 93 94 public void setMaxInactiveInterval(int interval) { 95 session.setMaxInactiveInterval(interval); 96 } 97 98 99 public int getMaxInactiveInterval() { 100 return session.getMaxInactiveInterval(); 101 } 102 103 104 public HttpSessionContext getSessionContext() { 105 return session.getSessionContext(); 106 } 107 108 109 public Object getAttribute(String name) { 110 return session.getAttribute(name); 111 } 112 113 114 public Object getValue(String name) { 115 return session.getAttribute(name); 116 } 117 118 119 public Enumeration getAttributeNames() { 120 return session.getAttributeNames(); 121 } 122 123 124 public String [] getValueNames() { 125 return session.getValueNames(); 126 } 127 128 129 public void setAttribute(String name, Object value) { 130 session.setAttribute(name, value); 131 } 132 133 134 public void putValue(String name, Object value) { 135 session.setAttribute(name, value); 136 } 137 138 139 public void removeAttribute(String name) { 140 session.removeAttribute(name); 141 } 142 143 144 public void removeValue(String name) { 145 session.removeAttribute(name); 146 } 147 148 149 public void invalidate() { 150 session.invalidate(); 151 } 152 153 154 public boolean isNew() { 155 return session.isNew(); 156 } 157 158 159 } 160 | Popular Tags |