Java Doc for WebContentInterceptor.java in  » J2EE » spring-framework-2.0.6 » org » springframework » web » servlet » mvc » 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.servlet.mvc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springframework.web.servlet.support.WebContentGenerator
   org.springframework.web.servlet.mvc.WebContentInterceptor

WebContentInterceptor
public class WebContentInterceptor extends WebContentGenerator implements HandlerInterceptor(Code)
Interceptor that checks and prepares request and response. Checks for supported methods and a required session, and applies the specified number of cache seconds. See superclass bean properties for configuration options.

All the settings supported by this interceptor can also be set on AbstractController. This interceptor is mainly intended for applying checks and preparations to a set of controllers mapped by a HandlerMapping.
author:
   Juergen Hoeller
since:
   27.11.2003
See Also:   AbstractController





Method Summary
public  voidafterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
     This implementation is empty.
protected  IntegerlookupCacheSeconds(String urlPath)
     Look up a cache seconds value for the given URL path.

Supports direct matches, e.g.

public  voidpostHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView)
     This implementation is empty.
public  booleanpreHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
    
public  voidsetAlwaysUseFullPath(boolean alwaysUseFullPath)
     Set if URL lookup should always use full path within current servlet context.
public  voidsetCacheMappings(Properties cacheMappings)
     Map specific URL paths to specific cache seconds.

Overrides the default cache seconds setting of this interceptor. Can specify "-1" to exclude a URL path from default caching.

Supports direct matches, e.g.

public  voidsetPathMatcher(PathMatcher pathMatcher)
     Set the PathMatcher implementation to use for matching URL paths against registered URL patterns, for determining cache mappings.
public  voidsetUrlDecode(boolean urlDecode)
     Set if context path and request URI should be URL-decoded.
public  voidsetUrlPathHelper(UrlPathHelper urlPathHelper)
     Set the UrlPathHelper to use for resolution of lookup paths.



Method Detail
afterCompletion
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception(Code)
This implementation is empty.



lookupCacheSeconds
protected Integer lookupCacheSeconds(String urlPath)(Code)
Look up a cache seconds value for the given URL path.

Supports direct matches, e.g. a registered "/test" matches "/test", and various Ant-style pattern matches, e.g. a registered "/t*" matches both "/test" and "/team". For details, see the AntPathMatcher class.
Parameters:
  urlPath - URL the bean is mapped to the associated cache seconds, or null if not found
See Also:   org.springframework.util.AntPathMatcher




postHandle
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception(Code)
This implementation is empty.



preHandle
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws ServletException(Code)



setAlwaysUseFullPath
public void setAlwaysUseFullPath(boolean alwaysUseFullPath)(Code)
Set if URL lookup should always use full path within current servlet context. Else, the path within the current servlet mapping is used if applicable (i.e. in the case of a ".../*" servlet mapping in web.xml). Default is "false".

Only relevant for the "cacheMappings" setting.
See Also:   WebContentInterceptor.setCacheMappings
See Also:   org.springframework.web.util.UrlPathHelper.setAlwaysUseFullPath




setCacheMappings
public void setCacheMappings(Properties cacheMappings)(Code)
Map specific URL paths to specific cache seconds.

Overrides the default cache seconds setting of this interceptor. Can specify "-1" to exclude a URL path from default caching.

Supports direct matches, e.g. a registered "/test" matches "/test", and a various Ant-style pattern matches, e.g. a registered "/t*" matches both "/test" and "/team". For details, see the AntPathMatcher javadoc.
Parameters:
  cacheMappings - a mapping between URL paths (as keys) andcache seconds (as values, need to be integer-parsable)
See Also:   WebContentInterceptor.setCacheSeconds
See Also:   org.springframework.util.AntPathMatcher




setPathMatcher
public void setPathMatcher(PathMatcher pathMatcher)(Code)
Set the PathMatcher implementation to use for matching URL paths against registered URL patterns, for determining cache mappings. Default is AntPathMatcher.
See Also:   WebContentInterceptor.setCacheMappings
See Also:   org.springframework.util.AntPathMatcher



setUrlDecode
public void setUrlDecode(boolean urlDecode)(Code)
Set if context path and request URI should be URL-decoded. Both are returned undecoded by the Servlet API, in contrast to the servlet path.

Uses either the request encoding or the default encoding according to the Servlet spec (ISO-8859-1).

Note: Setting this to "true" requires JDK 1.4 if the encoding differs from the VM's platform default encoding, as JDK 1.3's URLDecoder class does not offer a way to specify the encoding.

Only relevant for the "cacheMappings" setting.
See Also:   WebContentInterceptor.setCacheMappings
See Also:   org.springframework.web.util.UrlPathHelper.setUrlDecode




setUrlPathHelper
public void setUrlPathHelper(UrlPathHelper urlPathHelper)(Code)
Set the UrlPathHelper to use for resolution of lookup paths.

Use this to override the default UrlPathHelper with a custom subclass, or to share common UrlPathHelper settings across multiple HandlerMappings and MethodNameResolvers.

Only relevant for the "cacheMappings" setting.
See Also:   WebContentInterceptor.setCacheMappings
See Also:   org.springframework.web.servlet.handler.AbstractUrlHandlerMapping.setUrlPathHelper
See Also:   org.springframework.web.servlet.mvc.multiaction.AbstractUrlMethodNameResolver.setUrlPathHelper




Fields inherited from org.springframework.web.servlet.support.WebContentGenerator
final public static String METHOD_GET(Code)(Java Doc)
final public static String METHOD_HEAD(Code)(Java Doc)
final public static String METHOD_POST(Code)(Java Doc)

Methods inherited from org.springframework.web.servlet.support.WebContentGenerator
final protected void applyCacheSeconds(HttpServletResponse response, int seconds)(Code)(Java Doc)
final protected void applyCacheSeconds(HttpServletResponse response, int seconds, boolean mustRevalidate)(Code)(Java Doc)
final protected void cacheForSeconds(HttpServletResponse response, int seconds)(Code)(Java Doc)
final protected void cacheForSeconds(HttpServletResponse response, int seconds, boolean mustRevalidate)(Code)(Java Doc)
final protected void checkAndPrepare(HttpServletRequest request, HttpServletResponse response, boolean lastModified) throws ServletException(Code)(Java Doc)
final protected void checkAndPrepare(HttpServletRequest request, HttpServletResponse response, int cacheSeconds, boolean lastModified) throws ServletException(Code)(Java Doc)
final public int getCacheSeconds()(Code)(Java Doc)
final public String[] getSupportedMethods()(Code)(Java Doc)
final public boolean isRequireSession()(Code)(Java Doc)
final public boolean isUseCacheControlHeader()(Code)(Java Doc)
final public boolean isUseExpiresHeader()(Code)(Java Doc)
final protected void preventCaching(HttpServletResponse response)(Code)(Java Doc)
final public void setCacheSeconds(int seconds)(Code)(Java Doc)
final public void setRequireSession(boolean requireSession)(Code)(Java Doc)
final public void setSupportedMethods(String[] methods)(Code)(Java Doc)
final public void setUseCacheControlHeader(boolean useCacheControlHeader)(Code)(Java Doc)
final public void setUseExpiresHeader(boolean useExpiresHeader)(Code)(Java Doc)

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