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


org.springframework.web.context.request.RequestAttributes

All known Subclasses:   org.springframework.web.context.request.AbstractRequestAttributes,
RequestAttributes
public interface RequestAttributes (Code)
Abstraction for accessing attribute objects associated with a request. Supports access to request-scoped attributes as well as to session-scoped attributes, with the optional notion of a "global session".

Can be implemented for any kind of request/session mechanism, in particular for servlet requests and portlet requests.
author:
   Juergen Hoeller
since:
   2.0
See Also:   ServletRequestAttributes
See Also:   org.springframework.web.portlet.context.PortletRequestAttributes



Field Summary
 intSCOPE_GLOBAL_SESSION
     Constant that indicates global session scope.
 intSCOPE_REQUEST
     Constant that indicates request scope.
 intSCOPE_SESSION
     Constant that indicates session scope.


Method Summary
 ObjectgetAttribute(String name, int scope)
     Return the value for the scoped attribute of the given name, if any.
 String[]getAttributeNames(int scope)
     Retrieve the names of all attributes in the scope.
 StringgetSessionId()
     Return an id for the current underlying session.
 ObjectgetSessionMutex()
     Expose the best available mutex for the underlying session: that is, an object to synchronize on for the underlying session.
 voidregisterDestructionCallback(String name, Runnable callback, int scope)
     Register a callback to be executed on destruction of the specified attribute in the given scope.

Implementations should do their best to execute the callback at the appropriate time: that is, at request completion or session termination, respectively.

 voidremoveAttribute(String name, int scope)
     Remove the scoped attribute of the given name, if it exists.

Note that an implementation should also remove a registered destruction callback for the specified attribute, if any.

 voidsetAttribute(String name, Object value, int scope)
     Set the value for the scoped attribute of the given name, replacing an existing value (if any).

Field Detail
SCOPE_GLOBAL_SESSION
int SCOPE_GLOBAL_SESSION(Code)
Constant that indicates global session scope.

This explicitly refers to a globally shared session, if such a distinction is available (for example, in a Portlet environment). Else, it simply refers to the common session.




SCOPE_REQUEST
int SCOPE_REQUEST(Code)
Constant that indicates request scope.



SCOPE_SESSION
int SCOPE_SESSION(Code)
Constant that indicates session scope.

This preferably refers to a locally isolated session, if such a distinction is available (for example, in a Portlet environment). Else, it simply refers to the common session.






Method Detail
getAttribute
Object getAttribute(String name, int scope)(Code)
Return the value for the scoped attribute of the given name, if any.
Parameters:
  name - the name of the attribute
Parameters:
  scope - the scope identifier the current attribute value, or null if not found



getAttributeNames
String[] getAttributeNames(int scope)(Code)
Retrieve the names of all attributes in the scope.
Parameters:
  scope - the scope identifier the attribute names as String array



getSessionId
String getSessionId()(Code)
Return an id for the current underlying session. the session id as String (never null



getSessionMutex
Object getSessionMutex()(Code)
Expose the best available mutex for the underlying session: that is, an object to synchronize on for the underlying session. the session mutex to use (never null



registerDestructionCallback
void registerDestructionCallback(String name, Runnable callback, int scope)(Code)
Register a callback to be executed on destruction of the specified attribute in the given scope.

Implementations should do their best to execute the callback at the appropriate time: that is, at request completion or session termination, respectively. If such a callback is not supported by the underlying runtime environment, the callback must be ignored and a corresponding warning should be logged.

Note that 'destruction' usually corresponds to destruction of the entire scope, not to the individual attribute having been explicitly removed by the application. If an attribute gets removed via this facade's RequestAttributes.removeAttribute(String,int) method, any registered destruction callback should be disabled as well, assuming that the removed object will be reused or manually destroyed.
Parameters:
  name - the name of the attribute to register the callback for
Parameters:
  callback - the destruction callback to be executed
Parameters:
  scope - the scope identifier




removeAttribute
void removeAttribute(String name, int scope)(Code)
Remove the scoped attribute of the given name, if it exists.

Note that an implementation should also remove a registered destruction callback for the specified attribute, if any. It does, however, not need to execute a registered destruction callback in this case, since the object will be destroyed by the caller (if appropriate).
Parameters:
  name - the name of the attribute
Parameters:
  scope - the scope identifier




setAttribute
void setAttribute(String name, Object value, int scope)(Code)
Set the value for the scoped attribute of the given name, replacing an existing value (if any).
Parameters:
  name - the name of the attribute
Parameters:
  scope - the scope identifier
Parameters:
  value - the value for the attribute



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.