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


java.lang.Object
   org.springframework.web.filter.GenericFilterBean
      org.springframework.web.filter.OncePerRequestFilter
         org.springframework.web.filter.AbstractRequestLoggingFilter

All known Subclasses:   org.springframework.web.filter.CommonsRequestLoggingFilter,  org.springframework.web.filter.Log4jNestedDiagnosticContextFilter,  org.springframework.web.filter.ServletContextRequestLoggingFilter,
AbstractRequestLoggingFilter
abstract public class AbstractRequestLoggingFilter extends OncePerRequestFilter (Code)
Base class for Filters that perform logging operations before and after a request is processed.

Subclasses should override the beforeRequest(HttpServletRequest, String) and afterRequest(HttpServletRequest, String) methods to perform the actual logging around the request.

Subclasses are passed the message to write to the log in the beforeRequest and afterRequest methods. By default, only the URI of the request is logged. However, setting the includeQueryString property to true will cause the query string of the request to be included also.

Prefixes and suffixes for the before and after messages can be configured using the beforeMessagePrefix, afterMessagePrefix, beforeMessageSuffix and afterMessageSuffix properties,
author:
   Rob Harrop
author:
   Juergen Hoeller
since:
   1.2.5
See Also:   AbstractRequestLoggingFilter.beforeRequest
See Also:   AbstractRequestLoggingFilter.afterRequest



Field Summary
final public static  StringDEFAULT_AFTER_MESSAGE_PREFIX
    
final public static  StringDEFAULT_AFTER_MESSAGE_SUFFIX
    
final public static  StringDEFAULT_BEFORE_MESSAGE_PREFIX
    
final public static  StringDEFAULT_BEFORE_MESSAGE_SUFFIX
    


Method Summary
abstract protected  voidafterRequest(HttpServletRequest request, String message)
     Concrete subclasses should implement this method to write a log message after the request is processed.
abstract protected  voidbeforeRequest(HttpServletRequest request, String message)
     Concrete subclasses should implement this method to write a log message before the request is processed.
protected  StringcreateMessage(HttpServletRequest request, String prefix, String suffix)
     Create a log message for the given request, prefix and suffix.
protected  voiddoFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
     Forwards the request to the next filter in the chain and delegates down to the subclasses to perform the actual request logging both before and after the request is processed.
protected  booleanisIncludeQueryString()
     Return whether or not the query string should be included in the log message.
public  voidsetAfterMessagePrefix(String afterMessagePrefix)
     Set the value that should be prepended to the log message written after a request is processed.
public  voidsetAfterMessageSuffix(String afterMessageSuffix)
     Set the value that should be appended to the log message written after a request is processed.
public  voidsetBeforeMessagePrefix(String beforeMessagePrefix)
     Set the value that should be prepended to the log message written before a request is processed.
public  voidsetBeforeMessageSuffix(String beforeMessageSuffix)
     Set the value that should be apppended to the log message written before a request is processed.
public  voidsetIncludeQueryString(boolean includeQueryString)
     Set the whether or not the query string should be included in the log message.

Field Detail
DEFAULT_AFTER_MESSAGE_PREFIX
final public static String DEFAULT_AFTER_MESSAGE_PREFIX(Code)



DEFAULT_AFTER_MESSAGE_SUFFIX
final public static String DEFAULT_AFTER_MESSAGE_SUFFIX(Code)



DEFAULT_BEFORE_MESSAGE_PREFIX
final public static String DEFAULT_BEFORE_MESSAGE_PREFIX(Code)



DEFAULT_BEFORE_MESSAGE_SUFFIX
final public static String DEFAULT_BEFORE_MESSAGE_SUFFIX(Code)





Method Detail
afterRequest
abstract protected void afterRequest(HttpServletRequest request, String message)(Code)
Concrete subclasses should implement this method to write a log message after the request is processed.
Parameters:
  request - current HTTP request
Parameters:
  message - the message to log



beforeRequest
abstract protected void beforeRequest(HttpServletRequest request, String message)(Code)
Concrete subclasses should implement this method to write a log message before the request is processed.
Parameters:
  request - current HTTP request
Parameters:
  message - the message to log



createMessage
protected String createMessage(HttpServletRequest request, String prefix, String suffix)(Code)
Create a log message for the given request, prefix and suffix.

If includeQueryString is true then the inner part of the log message will take the form request_uri?query_string otherwise the message will simply be of the form request_uri.

The final message is composed of the inner part as described and the supplied prefix and suffix.




doFilterInternal
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException(Code)
Forwards the request to the next filter in the chain and delegates down to the subclasses to perform the actual request logging both before and after the request is processed.
See Also:   AbstractRequestLoggingFilter.beforeRequest
See Also:   AbstractRequestLoggingFilter.afterRequest



isIncludeQueryString
protected boolean isIncludeQueryString()(Code)
Return whether or not the query string should be included in the log message.



setAfterMessagePrefix
public void setAfterMessagePrefix(String afterMessagePrefix)(Code)
Set the value that should be prepended to the log message written after a request is processed.



setAfterMessageSuffix
public void setAfterMessageSuffix(String afterMessageSuffix)(Code)
Set the value that should be appended to the log message written after a request is processed.



setBeforeMessagePrefix
public void setBeforeMessagePrefix(String beforeMessagePrefix)(Code)
Set the value that should be prepended to the log message written before a request is processed.



setBeforeMessageSuffix
public void setBeforeMessageSuffix(String beforeMessageSuffix)(Code)
Set the value that should be apppended to the log message written before a request is processed.



setIncludeQueryString
public void setIncludeQueryString(boolean includeQueryString)(Code)
Set the whether or not the query string should be included in the log message. Should be configured using an <init-param> in the filter definition in web.xml.



Fields inherited from org.springframework.web.filter.OncePerRequestFilter
final public static String ALREADY_FILTERED_SUFFIX(Code)(Java Doc)

Methods inherited from org.springframework.web.filter.OncePerRequestFilter
final public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws ServletException, IOException(Code)(Java Doc)
abstract protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException(Code)(Java Doc)
protected String getAlreadyFilteredAttributeName()(Code)(Java Doc)
protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException(Code)(Java Doc)

Fields inherited from org.springframework.web.filter.GenericFilterBean
final protected Log logger(Code)(Java Doc)

Methods inherited from org.springframework.web.filter.GenericFilterBean
final protected void addRequiredProperty(String property)(Code)(Java Doc)
public void afterPropertiesSet() throws ServletException(Code)(Java Doc)
public void destroy()(Code)(Java Doc)
final public FilterConfig getFilterConfig()(Code)(Java Doc)
final protected String getFilterName()(Code)(Java Doc)
final protected ServletContext getServletContext()(Code)(Java Doc)
final public void init(FilterConfig filterConfig) throws ServletException(Code)(Java Doc)
protected void initBeanWrapper(BeanWrapper bw) throws BeansException(Code)(Java Doc)
protected void initFilterBean() throws ServletException(Code)(Java Doc)
final public void setBeanName(String beanName)(Code)(Java Doc)
final public void setFilterConfig(FilterConfig filterConfig)(Code)(Java Doc)
final public void setServletContext(ServletContext servletContext)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.