info.magnolia.cms.filters
Class ServletDispatchingFilter

java.lang.Object
  extended by info.magnolia.cms.filters.AbstractMgnlFilter
      extended by 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

Constructor Summary
ServletDispatchingFilter()
           
 
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.
 String getComment()
           
 String getName()
           
 Map getParameters()
           
 String getServletClass()
           
 String getServletName()
           
 void init(javax.servlet.FilterConfig filterConfig)
          Initializes the servlet and its mappings.
 void setComment(String comment)
           
 void setParameters(Map parameters)
           
 void setServletClass(String servletClass)
           
 void setServletName(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
 

Constructor Detail

ServletDispatchingFilter

public ServletDispatchingFilter()
Method Detail

getName

public 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 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:
IOException
javax.servlet.ServletException

getServletName

public String getServletName()

setServletName

public void setServletName(String servletName)

getServletClass

public String getServletClass()

setServletClass

public void setServletClass(String servletClass)

getParameters

public Map getParameters()

setParameters

public void setParameters(Map parameters)

getComment

public String getComment()

setComment

public void setComment(String comment)


Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.