com.caucho.rewrite
Class Location

java.lang.Object
  extended by com.caucho.rewrite.AbstractDispatchRule
      extended by com.caucho.rewrite.AbstractRegexpDispatchRule
          extended by com.caucho.rewrite.Location
All Implemented Interfaces:
DispatchRule

@Configurable
public class Location
extends AbstractRegexpDispatchRule

Filter container which matches URLs and conditions and contains child actions.

 <web-app xmlns="http://caucho.com/ns/resin"
        xmlns:resin="urn:java:com.caucho.resin">

 <resin:Location regexp="^/admin">
  <resin:IfSecure/>
  <resin:SetHeader name="Foo" value="bar"/>
 </resin:Location>

 </web-app>
 


Constructor Summary
Location()
           
 
Method Summary
 void add(DispatchRule rule)
          Adds a child dispatch rule
protected  FilterChain createDispatch(DispatcherType type, java.lang.String uri, java.lang.String queryString, java.lang.String target, FilterChain next)
           
 FilterChain map(DispatcherType type, java.lang.String uri, java.lang.String queryString, FilterChain next, FilterChain tail)
          Creates a FilterChain for the action based on the uri and query string.
 
Methods inherited from class com.caucho.rewrite.AbstractRegexpDispatchRule
add, add, add, getRegexp, isFilter, isForward, isInclude, isRequest, rewriteTarget, rewriteUri, setRegexp, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Location

public Location()
Method Detail

add

public void add(DispatchRule rule)
Adds a child dispatch rule


map

public FilterChain map(DispatcherType type,
                       java.lang.String uri,
                       java.lang.String queryString,
                       FilterChain next,
                       FilterChain tail)
                throws ServletException
Description copied from interface: DispatchRule
Creates a FilterChain for the action based on the uri and query string. Matching requests will use tail, and mismatching requests will use next. tail is the plain servlet/filter chain without any rewriting. next is the next rewrite dispatch

Specified by:
map in interface DispatchRule
Overrides:
map in class AbstractRegexpDispatchRule
uri - the request URI to match against
queryString - the request query string to match against
next - the next rewrite FilterChain dispatch
tail - the plain servlet/filter chain for a match
Throws:
ServletException

createDispatch

protected FilterChain createDispatch(DispatcherType type,
                                     java.lang.String uri,
                                     java.lang.String queryString,
                                     java.lang.String target,
                                     FilterChain next)
Overrides:
createDispatch in class AbstractRegexpDispatchRule