org.tuckey.web.filters.urlrewrite.extend
Class RewriteRule

java.lang.Object
  extended by org.tuckey.web.filters.urlrewrite.extend.RewriteRule
Direct Known Subclasses:
SampleRewriteRule

public class RewriteRule
extends java.lang.Object

A RewriteRule is basically the class that will figure out the answer to "Can we service this http request?". If we can we return a match object that will actually service the request.


Constructor Summary
RewriteRule()
           
 
Method Summary
 void destroy()
          Prepare to be shut down.
 boolean initialise(javax.servlet.ServletContext servletContext)
          Initialise the rule.
 RewriteMatch matches(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Can we match the current request? null means no.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RewriteRule

public RewriteRule()
Method Detail

initialise

public boolean initialise(javax.servlet.ServletContext servletContext)
Initialise the rule. If you return false here the rule will be marked as disabled.


destroy

public void destroy()
Prepare to be shut down. There will be no more calls to "matches" after this is called.


matches

public RewriteMatch matches(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
Can we match the current request? null means no. Return a valid RuleMatch object or new SimpleRewriteMatch() (or an object that extends RewriteMatch) if this rule matches.

Parameters:
request -
response -