public abstract class AbstractRegexpDispatchRule extends AbstractDispatchRule
| Constructor and Description |
|---|
AbstractRegexpDispatchRule() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Filter filter) |
void |
add(RequestPredicate predicate) |
void |
add(RewriteFilter filter) |
protected FilterChain |
createDispatch(DispatcherType type,
java.lang.String uri,
java.lang.String queryString,
java.lang.String target,
FilterChain next) |
java.util.regex.Pattern |
getRegexp() |
boolean |
isFilter() |
boolean |
isForward() |
boolean |
isInclude() |
boolean |
isRequest() |
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.
|
protected java.lang.String |
rewriteTarget(java.util.regex.Matcher matcher,
java.lang.String uri,
java.lang.String queryString) |
java.lang.String |
rewriteUri(java.lang.String uri,
java.lang.String queryString)
Rewrites the URI for further processing.
|
void |
setRegexp(java.util.regex.Pattern regexp) |
java.lang.String |
toString() |
public void setRegexp(java.util.regex.Pattern regexp)
public java.util.regex.Pattern getRegexp()
public boolean isRequest()
isRequest in interface DispatchRuleisRequest in class AbstractDispatchRulepublic boolean isInclude()
isInclude in interface DispatchRuleisInclude in class AbstractDispatchRulepublic boolean isForward()
isForward in interface DispatchRuleisForward in class AbstractDispatchRulepublic boolean isFilter()
public void add(RequestPredicate predicate)
public void add(RewriteFilter filter)
public void add(Filter filter) throws ServletException
ServletExceptionpublic java.lang.String rewriteUri(java.lang.String uri,
java.lang.String queryString)
DispatchRulerewriteUri in interface DispatchRulerewriteUri in class AbstractDispatchRulepublic FilterChain map(DispatcherType type, java.lang.String uri, java.lang.String queryString, FilterChain next, FilterChain tail) throws ServletException
DispatchRuletail, and mismatching
requests will use next. tail is the
plain servlet/filter chain without any rewriting. next
is the next rewrite dispatchmap in interface DispatchRulemap in class AbstractDispatchRuleuri - the request URI to match againstqueryString - the request query string to match againstnext - the next rewrite FilterChain dispatchtail - the plain servlet/filter chain for a matchServletExceptionprotected FilterChain createDispatch(DispatcherType type, java.lang.String uri, java.lang.String queryString, java.lang.String target, FilterChain next)
protected java.lang.String rewriteTarget(java.util.regex.Matcher matcher,
java.lang.String uri,
java.lang.String queryString)
public java.lang.String toString()
toString in class AbstractDispatchRule