01: /*
02: * Copyright 2003-2006 Rick Knowles <winstone-devel at lists sourceforge net>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: */
07: package javax.servlet.http;
08:
09: import java.util.Enumeration;
10:
11: import javax.servlet.ServletContext;
12:
13: /**
14: * Interface for http sessions on the server.
15: *
16: * @author <a href="mailto:rick_knowles@hotmail.com">Rick Knowles</a>
17: */
18: public interface HttpSession {
19: public Object getAttribute(String name);
20:
21: public Enumeration getAttributeNames();
22:
23: public long getCreationTime();
24:
25: public String getId();
26:
27: public long getLastAccessedTime();
28:
29: public int getMaxInactiveInterval();
30:
31: public ServletContext getServletContext();
32:
33: public void invalidate();
34:
35: public boolean isNew();
36:
37: public void removeAttribute(String name);
38:
39: public void setAttribute(String name, Object value);
40:
41: public void setMaxInactiveInterval(int interval);
42:
43: /**
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
46: * Java Servlet API.
47: */
48: public HttpSessionContext getSessionContext();
49:
50: /**
51: * @deprecated As of Version 2.2, this method is replaced by
52: * getAttribute(java.lang.String).
53: */
54: public Object getValue(String name);
55:
56: /**
57: * @deprecated As of Version 2.2, this method is replaced by
58: * getAttributeNames()
59: */
60: public String[] getValueNames();
61:
62: /**
63: * @deprecated As of Version 2.2, this method is replaced by
64: * setAttribute(java.lang.String, java.lang.Object)
65: */
66: public void putValue(String name, Object value);
67:
68: /**
69: * @deprecated As of Version 2.2, this method is replaced by
70: * removeAttribute(java.lang.String)
71: */
72: public void removeValue(String name);
73: }
|