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 DispatchRule
isRequest
in class AbstractDispatchRule
public boolean isInclude()
isInclude
in interface DispatchRule
isInclude
in class AbstractDispatchRule
public boolean isForward()
isForward
in interface DispatchRule
isForward
in class AbstractDispatchRule
public boolean isFilter()
public void add(RequestPredicate predicate)
public void add(RewriteFilter filter)
public void add(Filter filter) throws ServletException
ServletException
public java.lang.String rewriteUri(java.lang.String uri, java.lang.String queryString)
DispatchRule
rewriteUri
in interface DispatchRule
rewriteUri
in class AbstractDispatchRule
public FilterChain map(DispatcherType type, java.lang.String uri, java.lang.String queryString, FilterChain next, FilterChain tail) throws ServletException
DispatchRule
tail
, and mismatching
requests will use next
. tail
is the
plain servlet/filter chain without any rewriting. next
is the next rewrite dispatchmap
in interface DispatchRule
map
in class AbstractDispatchRule
uri
- 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 matchServletException
protected 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