com.caucho.server.rewrite
Class DispatchRule
java.lang.Object
com.caucho.server.rewrite.AbstractRule
com.caucho.server.rewrite.AbstractRuleWithConditions
com.caucho.server.rewrite.DispatchRule
- All Implemented Interfaces:
- FilterChainMapper, Rule
public class DispatchRule
- extends AbstractRuleWithConditions
Method Summary |
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()
|
java.lang.String |
getTarget()
|
void |
init()
|
java.lang.String |
rewrite(java.lang.String uri,
java.util.regex.Matcher matcher)
Return a rewritten uri to use for the rest of the processing of
rewrite-dispatch. |
void |
setAbsoluteTarget(java.lang.String target)
|
void |
setTarget(java.lang.String target)
|
void |
setTargetHost(java.lang.String target)
|
Methods inherited from class com.caucho.server.rewrite.AbstractRuleWithConditions |
addAnd, addNot, addOr, addUnless, addWhen, destroy, getFullUrlRegexp, getRegexp, map, mapImpl, required, setFullUrlRegexp, setRegexp |
Methods inherited from class com.caucho.server.rewrite.AbstractRule |
clearCache, createAdmin, getFailFilterChainMapper, getLogPrefix, getName, getPassFilterChainMapper, getRewriteDispatch, isEnabled, register, setDisableAt, setEnableAt, setEnabled, setFailFilterChainMapper, setLogPrefix, setName, setPassFilterChainMapper, unregister |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DispatchRule
protected DispatchRule(RewriteDispatch rewriteDispatch)
getTagName
public java.lang.String getTagName()
setAbsoluteTarget
public void setAbsoluteTarget(java.lang.String target)
setTarget
public void setTarget(java.lang.String target)
setTargetHost
public void setTargetHost(java.lang.String target)
getTarget
public java.lang.String getTarget()
rewrite
public java.lang.String rewrite(java.lang.String uri,
java.util.regex.Matcher matcher)
- Description copied from class:
AbstractRuleWithConditions
- Return a rewritten uri to use for the rest of the processing of
rewrite-dispatch.
- Overrides:
rewrite
in class AbstractRuleWithConditions
matcher
- a Matcher obtained from doing a regexp comparison, or null
if there was no regexp comparison
dispatch
public FilterChain dispatch(java.lang.String uri,
java.lang.String queryString,
FilterChain accept,
FilterChainMapper next)
- Description copied from class:
AbstractRuleWithConditions
- Returns the FilterChain to invoke if the rule is successful, null indicates
that the rule does not invoke a FilterChain.
- Specified by:
dispatch
in class AbstractRuleWithConditions
- Parameters:
uri
- the target uri, possibly rewrittenaccept
- a FilterChain that stops evaluation of rewrite rules and
init
@PostConstruct
public void init()
throws ConfigException
- Overrides:
init
in class AbstractRuleWithConditions
- Throws:
ConfigException