|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.filter.ConditionalDelegatingFilter
public class ConditionalDelegatingFilter
Invokes another "target" filter if that filter is present in the classpath, or does nothing if the filter is not present. The target filter's init and destroy methods are called from this wrapper's init and destroy methods.
The following snippet from a web.xml file would invoke the
com.target.filter
filter if it exists. The target
filter would have access to its someTargetParameter
value.
<filter> <filter-name>MyFilterService</filter-name> <filter-class>atg.filter.ConditionalDelegatingFilter</filter-class> <init-param> <param-name>targetFilter</param-name> <param-value>com.target.filter</param-value> </init-param> <init-param> <param-name>someTargetParameter</param-name> <param-value>someValue</param-value> </init-param> </filter>
Field Summary | |
---|---|
static java.lang.String |
CLASS_NAME_PARAMETER_NAME
|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
FILTER_CLASS_NAME
|
protected javax.servlet.Filter |
mTarget
|
Constructor Summary | |
---|---|
ConditionalDelegatingFilter()
|
Method Summary | |
---|---|
void |
destroy()
Called by the web container to indicate to a filter that it is being taken out of service |
void |
doFilter(javax.servlet.ServletRequest pRequest,
javax.servlet.ServletResponse pResponse,
javax.servlet.FilterChain pFilterChain)
Called by the web container to indicate that a filter should filter a request/response |
void |
init(javax.servlet.FilterConfig pFilterConfig)
Called by the web container to indicate to a filter that it is being placed into service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
public static final java.lang.String FILTER_CLASS_NAME
public static final java.lang.String CLASS_NAME_PARAMETER_NAME
protected javax.servlet.Filter mTarget
Constructor Detail |
---|
public ConditionalDelegatingFilter()
Method Detail |
---|
public void doFilter(javax.servlet.ServletRequest pRequest, javax.servlet.ServletResponse pResponse, javax.servlet.FilterChain pFilterChain) throws java.io.IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
pRequest
- the servlet requestpServletResponse
- the servlet responsepFilterChain
- the filter chain
java.io.IOException
- if an i/o error occurs
javax.servlet.ServletException
- if an error occurs when processing this filterpublic void init(javax.servlet.FilterConfig pFilterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
pFilterConfig
- filter configuration information
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |