2
* Copyright 2003-2006 Rick Knowles <winstone-devel at lists sourceforge net>
3
* Distributed under the terms of either:
4
* - the common development and distribution license (CDDL), v1.0; or
5
* - the GNU Lesser General Public License, v2.1 or later
7
package javax.servlet.http;
9
import java.util.Enumeration;
11
import javax.servlet.ServletContext;
14
* Interface for http sessions on the server.
16
* @author <a href="mailto:rick_knowles@hotmail.com">Rick Knowles</a>
18
public interface HttpSession {
19
public Object getAttribute(String name);
21
public Enumeration getAttributeNames();
23
public long getCreationTime();
25
public String getId();
27
public long getLastAccessedTime();
29
public int getMaxInactiveInterval();
31
public ServletContext getServletContext();
33
public void invalidate();
35
public boolean isNew();
37
public void removeAttribute(String name);
39
public void setAttribute(String name, Object value);
41
public void setMaxInactiveInterval(int interval);
44
* @deprecated As of Version 2.1, this method is deprecated and has no
45
* replacement. It will be removed in a future version of the
48
public HttpSessionContext getSessionContext();
51
* @deprecated As of Version 2.2, this method is replaced by
52
* getAttribute(java.lang.String).
54
public Object getValue(String name);
57
* @deprecated As of Version 2.2, this method is replaced by
60
public String[] getValueNames();
63
* @deprecated As of Version 2.2, this method is replaced by
64
* setAttribute(java.lang.String, java.lang.Object)
66
public void putValue(String name, Object value);
69
* @deprecated As of Version 2.2, this method is replaced by
70
* removeAttribute(java.lang.String)
72
public void removeValue(String name);