info.magnolia.cms.filters
Class ServletDispatchingFilter
java.lang.Object
info.magnolia.cms.filters.AbstractMgnlFilter
info.magnolia.cms.filters.ServletDispatchingFilter
- All Implemented Interfaces:
- MgnlFilter, javax.servlet.Filter
public class ServletDispatchingFilter
- extends AbstractMgnlFilter
A filter that dispatches requests to a wrapped servlet.
TODO : cache matching URIs ?
- Version:
- $Id: ServletDispatchingFilter.java 41137 2011-01-06 18:19:25Z gjoseph $
- Author:
- vsteller
Method Summary |
void |
destroy()
Delegates the destroy() call to the wrapper servlet, then to this filter itself. |
void |
doFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
Dispatches the request to the servlet if not already bypassed. |
java.lang.String |
getComment()
|
java.lang.String |
getName()
|
java.util.Map |
getParameters()
|
java.lang.String |
getServletClass()
|
java.lang.String |
getServletName()
|
void |
init(javax.servlet.FilterConfig filterConfig)
Initializes the servlet and its mappings. |
void |
setComment(java.lang.String comment)
|
void |
setParameters(java.util.Map parameters)
|
void |
setServletClass(java.lang.String servletClass)
|
void |
setServletName(java.lang.String servletName)
|
Methods inherited from class info.magnolia.cms.filters.AbstractMgnlFilter |
acceptsEncoding, acceptsGzipEncoding, addAndVerifyHeader, addBypass, addMapping, bypasses, doFilter, getBypasses, getDispatching, getMapping, getMappings, headerContains, isEnabled, mapsTo, matches, matchesDispatching, setDispatching, setEnabled, setName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletDispatchingFilter
public ServletDispatchingFilter()
getName
public java.lang.String getName()
- Specified by:
getName
in interface MgnlFilter
- Overrides:
getName
in class AbstractMgnlFilter
init
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- Initializes the servlet and its mappings. ServletConfig is wrapped to take init parameters into account.
- Specified by:
init
in interface javax.servlet.Filter
- Overrides:
init
in class AbstractMgnlFilter
- Throws:
javax.servlet.ServletException
destroy
public void destroy()
- Delegates the destroy() call to the wrapper servlet, then to this filter itself.
- Specified by:
destroy
in interface javax.servlet.Filter
- Overrides:
destroy
in class AbstractMgnlFilter
doFilter
public void doFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
- Dispatches the request to the servlet if not already bypassed. The request is wrapped for properly setting the
pathInfo.
- Specified by:
doFilter
in class AbstractMgnlFilter
- Throws:
java.io.IOException
javax.servlet.ServletException
getServletName
public java.lang.String getServletName()
setServletName
public void setServletName(java.lang.String servletName)
getServletClass
public java.lang.String getServletClass()
setServletClass
public void setServletClass(java.lang.String servletClass)
getParameters
public java.util.Map getParameters()
setParameters
public void setParameters(java.util.Map parameters)
getComment
public java.lang.String getComment()
setComment
public void setComment(java.lang.String comment)
Copyright © 2003-2011 Magnolia International Ltd.. All Rights Reserved.