public class MatchRule extends AbstractRuleWithConditions implements AlarmListener
AbstractRule.RewriteRuleAdmin
Modifier | Constructor and Description |
---|---|
protected |
MatchRule(RewriteDispatch rewriteDispatch) |
Modifier and Type | Method and Description |
---|---|
void |
addDependency(PersistentDependency depend) |
void |
addDispatch(DispatchRule dispatch) |
void |
addForbidden(ErrorRule forbidden) |
void |
addForward(ForwardRule forward) |
void |
addGone(ErrorRule gone) |
void |
addImport(ImportRule importRule) |
void |
addLoadBalance(LoadBalanceRule loadBalance) |
void |
addMatch(MatchRule match) |
void |
addMovedPermanently(MovedRule moved) |
void |
addNotFound(ErrorRule notFound) |
void |
addProxy(ProxyRule proxy) |
void |
addRedirect(RedirectRule redirect) |
void |
addRewrite(RewriteRule rewrite) |
void |
addSet(SetRule set) |
DispatchRule |
createDispatch()
Adds a dispatch.
|
ErrorRule |
createForbidden()
Adds a forbidden.
|
ForwardRule |
createForward()
Adds a forward.
|
ErrorRule |
createGone()
Adds a gone.
|
ImportRule |
createImport() |
LoadBalanceRule |
createLoadBalance()
Adds a load-balance
|
MatchRule |
createMatch() |
MovedRule |
createMovedPermanently()
Adds a moved permanently (301)
|
ErrorRule |
createNotFound()
Adds a not-found.
|
ProxyRule |
createProxy()
Adds a proxy
|
RedirectRule |
createRedirect()
Adds a redirect.
|
RewriteRule |
createRewrite()
Adds a rewrite
|
SetRule |
createSet()
Adds a set
|
void |
destroy() |
FilterChain |
dispatch(java.lang.String uri,
java.lang.String queryString,
FilterChain accept,
FilterChainMapper next)
Returns the FilterChain to invoke if the rule is successful, null indicates
that the rule does not invoke a FilterChain.
|
java.lang.String |
getTagName() |
void |
handleAlarm(Alarm alarm)
Handles a callback from an alarm.
|
void |
init() |
boolean |
isModified() |
void |
register() |
java.lang.String |
rewriteUri(java.lang.String uri,
java.lang.String queryString) |
void |
setPassFilterChainMapper(FilterChainMapper nextFilterChainMapper) |
void |
unregister() |
addAnd, addNot, addOr, addUnless, addWhen, getFullUrlRegexp, getRegexp, map, mapImpl, required, rewrite, setFullUrlRegexp, setRegexp
clearCache, createAdmin, getFailFilterChainMapper, getLogPrefix, getName, getPassFilterChainMapper, getRewriteDispatch, isEnabled, setDisableAt, setEnableAt, setEnabled, setFailFilterChainMapper, setLogPrefix, setName
protected MatchRule(RewriteDispatch rewriteDispatch)
public java.lang.String getTagName()
getTagName
in interface Rule
public boolean isModified()
public void addDependency(PersistentDependency depend)
public void setPassFilterChainMapper(FilterChainMapper nextFilterChainMapper)
setPassFilterChainMapper
in interface Rule
setPassFilterChainMapper
in class AbstractRule
public DispatchRule createDispatch()
public void addDispatch(DispatchRule dispatch)
public ErrorRule createForbidden()
public void addForbidden(ErrorRule forbidden)
public ForwardRule createForward()
public void addForward(ForwardRule forward)
public ErrorRule createGone()
public void addGone(ErrorRule gone)
public ImportRule createImport()
public void addImport(ImportRule importRule)
public LoadBalanceRule createLoadBalance()
public void addLoadBalance(LoadBalanceRule loadBalance)
public ProxyRule createProxy()
public void addProxy(ProxyRule proxy)
public MatchRule createMatch()
public void addMatch(MatchRule match)
public MovedRule createMovedPermanently()
public void addMovedPermanently(MovedRule moved)
public ErrorRule createNotFound()
public void addNotFound(ErrorRule notFound)
public RedirectRule createRedirect()
public void addRedirect(RedirectRule redirect)
public RewriteRule createRewrite()
public void addRewrite(RewriteRule rewrite)
public SetRule createSet()
public void addSet(SetRule set)
@PostConstruct public void init()
init
in class AbstractRuleWithConditions
public java.lang.String rewriteUri(java.lang.String uri, java.lang.String queryString)
public FilterChain dispatch(java.lang.String uri, java.lang.String queryString, FilterChain accept, FilterChainMapper next) throws ServletException
AbstractRuleWithConditions
dispatch
in class AbstractRuleWithConditions
uri
- the target uri, possibly rewrittenaccept
- a FilterChain that stops evaluation of rewrite rules andServletException
public void register()
register
in interface Rule
register
in class AbstractRule
public void unregister()
unregister
in interface Rule
unregister
in class AbstractRule
public void handleAlarm(Alarm alarm)
AlarmListener
handleAlarm
in interface AlarmListener
public void destroy()
destroy
in interface Rule
destroy
in class AbstractRuleWithConditions