|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.filter.GenericFilterBean
Simple base implementation of javax.servlet.Filter that treats its config parameters as bean properties. A very handy superclass for any type of filter. Type conversion is automatic. It is also possible for subclasses to specify required properties.
This filter leaves actual filtering to subclasses.
initFilterBean()
Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
GenericFilterBean()
|
Method Summary | |
protected void |
addRequiredProperty(java.lang.String property)
Subclasses can invoke this method to specify that this property (which must match a JavaBean property they expose) is mandatory, and must be supplied as a config parameter. |
void |
destroy()
Subclasses may override this to perform custom filter shutdown. |
protected javax.servlet.FilterConfig |
getFilterConfig()
Make the FilterConfig of this filter available to subclasses. |
protected java.lang.String |
getFilterName()
Make the name of this filter available to subclasses. |
protected javax.servlet.ServletContext |
getServletContext()
Make the ServletContext of this filter available to subclasses. |
void |
init(javax.servlet.FilterConfig filterConfig)
Map config parameters onto bean properties of this filter, and invoke subclass initialization. |
protected void |
initFilterBean()
Subclasses may override this to perform custom initialization. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.Filter |
doFilter |
Field Detail |
protected final org.apache.commons.logging.Log logger
Constructor Detail |
public GenericFilterBean()
Method Detail |
protected final void addRequiredProperty(java.lang.String property)
property
- name of the required propertypublic final void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
- if bean properties are invalid (or required
properties are missing), or if subclass initialization fails.initFilterBean()
protected final javax.servlet.FilterConfig getFilterConfig()
GenericServlet.getServletConfig()
protected final java.lang.String getFilterName()
GenericServlet.getServletName()
protected final javax.servlet.ServletContext getServletContext()
GenericServlet.getServletContext()
protected void initFilterBean() throws javax.servlet.ServletException
javax.servlet.ServletException
- if subclass initialization failspublic void destroy()
destroy
in interface javax.servlet.Filter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |