Source Code Cross Referenced for Session.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » tool » api » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » sakai » org.sakaiproject.tool.api 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************************
002:         * $URL: https://source.sakaiproject.org/svn/tool/tags/sakai_2-4-1/tool-api/api/src/java/org/sakaiproject/tool/api/Session.java $
003:         * $Id: Session.java 9360 2006-05-14 19:23:12Z ggolden@umich.edu $
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 2005, 2006 The Sakai Foundation.
007:         * 
008:         * Licensed under the Educational Community License, Version 1.0 (the "License"); 
009:         * you may not use this file except in compliance with the License. 
010:         * You may obtain a copy of the License at
011:         * 
012:         *      http://www.opensource.org/licenses/ecl1.php
013:         * 
014:         * Unless required by applicable law or agreed to in writing, software 
015:         * distributed under the License is distributed on an "AS IS" BASIS, 
016:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
017:         * See the License for the specific language governing permissions and 
018:         * limitations under the License.
019:         *
020:         **********************************************************************************/package org.sakaiproject.tool.api;
021:
022:        import java.util.Collection;
023:        import java.util.Enumeration;
024:
025:        /**
026:         * <p>
027:         * Session models an end user's Sakai-wide usage session, modeled on the HttpSession of the Servlet API.
028:         * </p>
029:         */
030:        public interface Session {
031:            /**
032:             * Returns the object bound with the specified name in this session, or <code>null</code> if no object is bound under the name.
033:             * 
034:             * @param name
035:             *        a string specifying the name of the object
036:             * @return the object with the specified name
037:             * @exception IllegalStateException
038:             *            if this method is called on an invalidated session
039:             */
040:            Object getAttribute(String name);
041:
042:            /**
043:             * Returns an <code>Enumeration</code> of <code>String</code> objects containing the names of all the objects bound to this session.
044:             * 
045:             * @return an <code>Enumeration</code> of <code>String</code> objects specifying the names of all the objects bound to this session
046:             * @exception IllegalStateException
047:             *            if this method is called on an invalidated session
048:             */
049:            Enumeration getAttributeNames();
050:
051:            /**
052:             * Returns the time when this session was created, measured in milliseconds since midnight January 1, 1970 GMT.
053:             * 
054:             * @return a <code>long</code> specifying when this session was created, expressed in milliseconds since 1/1/1970 GMT
055:             * @exception IllegalStateException
056:             *            if this method is called on an invalidated session
057:             */
058:            long getCreationTime();
059:
060:            /**
061:             * Returns a string containing the unique identifier assigned to this session.
062:             * 
063:             * @return a string specifying the identifier assigned to this session
064:             * @exception IllegalStateException
065:             *            if this method is called on an invalidated session
066:             */
067:            String getId();
068:
069:            /**
070:             * Returns the last time the client sent a request associated with this session, as the number of milliseconds since midnight January 1, 1970 GMT.
071:             * <p>
072:             * Actions that your application takes, such as getting or setting a value associated with the session, do not affect the access time.
073:             * 
074:             * @return a <code>long</code> representing the last time the client sent a request associated with this session, expressed in milliseconds since 1/1/1970 GMT
075:             * @exception IllegalStateException
076:             *            if this method is called on an invalidated session
077:             */
078:            long getLastAccessedTime();
079:
080:            /**
081:             * Returns the maximum time interval, in seconds, that Sakai will keep this session open between client accesses. After this interval, Sakai will invalidate the session. The maximum time interval can be set with the <code>setMaxInactiveInterval</code>
082:             * method. A negative time indicates the session should never timeout.
083:             * 
084:             * @return an integer specifying the number of seconds this session remains open between client requests
085:             * @see #setMaxInactiveInterval
086:             */
087:            int getMaxInactiveInterval();
088:
089:            /**
090:             * Find or create a tool session for this tool placement id
091:             * 
092:             * @param placementId
093:             *        The id used to identify the session.
094:             * @return The ToolSession to use for this tool placement id.
095:             */
096:            ToolSession getToolSession(String placementId);
097:
098:            /**
099:             * Find or create a context session for this context id
100:             * 
101:             * @param contextId
102:             *        The id used to identify the session.
103:             * @return The ContextSession to use for this context id.
104:             */
105:            ContextSession getContextSession(String contextId);
106:
107:            /**
108:             * Return the enterprise id of the user associated with this session.
109:             * 
110:             * @return The enterprise id of the user associated with this session.
111:             */
112:            String getUserEid();
113:
114:            /**
115:             * Return the authenticated user id associated with this session.
116:             * 
117:             * @return The authenticated user id associated with this session.
118:             */
119:            String getUserId();
120:
121:            /**
122:             * Invalidates this session then unbinds any objects bound to it.
123:             */
124:            void invalidate();
125:
126:            /**
127:             * Clear this session's attributes, unbinding any objects bound, but do NOT fully invalidate - it remains the current session.
128:             */
129:            void clear();
130:
131:            /**
132:             * Clear this session's attributes, except for those named, unbinding any objects bound, but do NOT fully invalidate - it remains the current session.
133:             */
134:            void clearExcept(Collection names);
135:
136:            /**
137:             * Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.
138:             * <p>
139:             * After this method executes, and if the object implements <code>SessionBindingListener</code>, Sakai calls <code>SessionBindingListener.valueUnbound</code>.
140:             * 
141:             * @param name
142:             *        the name of the object to remove from this session
143:             * @exception IllegalStateException
144:             *            if this method is called on an invalidated session
145:             */
146:            void removeAttribute(String name);
147:
148:            /**
149:             * Mark the session as still active, delaying timeout by another period.
150:             */
151:            void setActive();
152:
153:            /**
154:             * Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.
155:             * <p>
156:             * After this method executes, and if the new object implements <code>SessionBindingListener</code>, Sakai calls <code>SessionBindingListener.valueBound</code>.
157:             * <p>
158:             * If an object was already bound to this session of this name that implements <code>SessionBindingListener</code>, its <code>SessionBindingListener.valueUnbound</code> method is called.
159:             * <p>
160:             * If the value passed in is null, this has the same effect as calling <code>removeAttribute()<code>.
161:             *
162:             * @param name			the name to which the object is bound;
163:             *					cannot be null
164:             *
165:             * @param value			the object to be bound
166:             *
167:             * @exception IllegalStateException	if this method is called on an
168:             *					invalidated session
169:             */
170:            void setAttribute(String name, Object value);
171:
172:            /**
173:             * Specifies the time, in seconds, between client requests before the Sakai will invalidate this session. A negative time indicates the session should never timeout.
174:             * 
175:             * @param interval
176:             *        An integer specifying the number of seconds
177:             */
178:            void setMaxInactiveInterval(int interval);
179:
180:            /**
181:             * Set the enterprise id of the user associated with this session.
182:             * 
183:             * @return The enterprise id of the user associated with this session.
184:             */
185:            void setUserEid(String eid);
186:
187:            /**
188:             * Set the user id associated with this session.
189:             * 
190:             * @param uid
191:             *        The user id associated with this session.
192:             */
193:            void setUserId(String uid);
194:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.