Source Code Cross Referenced for RequestAttributes.java in  » J2EE » spring-framework-2.0.6 » org » springframework » web » context » request » 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 » J2EE » spring framework 2.0.6 » org.springframework.web.context.request 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2002-2007 the original author or authors.
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *      http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:
017:        package org.springframework.web.context.request;
018:
019:        /**
020:         * Abstraction for accessing attribute objects associated with a request.
021:         * Supports access to request-scoped attributes as well as to session-scoped
022:         * attributes, with the optional notion of a "global session".
023:         *
024:         * <p>Can be implemented for any kind of request/session mechanism,
025:         * in particular for servlet requests and portlet requests.
026:         *
027:         * @author Juergen Hoeller
028:         * @since 2.0
029:         * @see ServletRequestAttributes
030:         * @see org.springframework.web.portlet.context.PortletRequestAttributes
031:         */
032:        public interface RequestAttributes {
033:
034:            /**
035:             * Constant that indicates request scope.
036:             */
037:            int SCOPE_REQUEST = 0;
038:
039:            /**
040:             * Constant that indicates session scope.
041:             * <p>This preferably refers to a locally isolated session, if such
042:             * a distinction is available (for example, in a Portlet environment).
043:             * Else, it simply refers to the common session.
044:             */
045:            int SCOPE_SESSION = 1;
046:
047:            /**
048:             * Constant that indicates global session scope.
049:             * <p>This explicitly refers to a globally shared session, if such
050:             * a distinction is available (for example, in a Portlet environment).
051:             * Else, it simply refers to the common session.
052:             */
053:            int SCOPE_GLOBAL_SESSION = 2;
054:
055:            /**
056:             * Return the value for the scoped attribute of the given name, if any.
057:             * @param name the name of the attribute
058:             * @param scope the scope identifier
059:             * @return the current attribute value, or <code>null</code> if not found
060:             */
061:            Object getAttribute(String name, int scope);
062:
063:            /**
064:             * Set the value for the scoped attribute of the given name,
065:             * replacing an existing value (if any).
066:             * @param name the name of the attribute
067:             * @param scope the scope identifier
068:             * @param value the value for the attribute
069:             */
070:            void setAttribute(String name, Object value, int scope);
071:
072:            /**
073:             * Remove the scoped attribute of the given name, if it exists.
074:             * <p>Note that an implementation should also remove a registered destruction
075:             * callback for the specified attribute, if any. It does, however, <i>not</i>
076:             * need to <i>execute</i> a registered destruction callback in this case,
077:             * since the object will be destroyed by the caller (if appropriate).
078:             * @param name the name of the attribute
079:             * @param scope the scope identifier
080:             */
081:            void removeAttribute(String name, int scope);
082:
083:            /**
084:             * Register a callback to be executed on destruction of the
085:             * specified attribute in the given scope.
086:             * <p>Implementations should do their best to execute the callback
087:             * at the appropriate time: that is, at request completion or session
088:             * termination, respectively. If such a callback is not supported by the
089:             * underlying runtime environment, the callback <i>must be ignored</i>
090:             * and a corresponding warning should be logged.
091:             * <p>Note that 'destruction' usually corresponds to destruction of the
092:             * entire scope, not to the individual attribute having been explicitly
093:             * removed by the application. If an attribute gets removed via this
094:             * facade's {@link #removeAttribute(String, int)} method, any registered
095:             * destruction callback should be disabled as well, assuming that the
096:             * removed object will be reused or manually destroyed.
097:             * @param name the name of the attribute to register the callback for
098:             * @param callback the destruction callback to be executed
099:             * @param scope the scope identifier
100:             */
101:            void registerDestructionCallback(String name, Runnable callback,
102:                    int scope);
103:
104:            /**
105:             * Return an id for the current underlying session.
106:             * @return the session id as String (never <code>null</code>
107:             */
108:            String getSessionId();
109:
110:            /**
111:             * Expose the best available mutex for the underlying session:
112:             * that is, an object to synchronize on for the underlying session.
113:             * @return the session mutex to use (never <code>null</code>
114:             */
115:            Object getSessionMutex();
116:
117:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.