|
|||||||||||
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. |
javax.servlet.FilterConfig |
getFilterConfig()
Make the FilterConfig of this filter available. |
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 |
initBeanWrapper(BeanWrapper bw)
Initialize the BeanWrapper for this GenericFilterBean, possibly with custom editors. |
protected void |
initFilterBean()
Subclasses may override this to perform custom initialization. |
void |
setFilterConfig(javax.servlet.FilterConfig filterConfig)
Alternative way of initializing this filter. |
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 setFilterConfig(javax.servlet.FilterConfig filterConfig)
filterConfig
- the configuration for this filter
FatalBeanException
- wrapping a ServletException
thrown by the init methodinit(javax.servlet.FilterConfig)
public final void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
filterConfig
- the configuration for this filter
javax.servlet.ServletException
- if bean properties are invalid (or required
properties are missing), or if subclass initialization fails.initFilterBean()
protected void initBeanWrapper(BeanWrapper bw) throws BeansException
bw
- the BeanWrapper to initialize
BeansException
- if thrown by BeanWrapper methodsBeanWrapper.registerCustomEditor(java.lang.Class, java.beans.PropertyEditor)
public final javax.servlet.FilterConfig getFilterConfig()
Public to resemble the getFilterConfig method of the Servlet Filter version that shipped with WebLogic 6.1.
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 |