public abstract class Substitute extends HttpOperation implements Parameterized
Operation responsible for substituting an inbound or outbound Address with a replacement. For
InboundRewrite events, this calls InboundServletRewrite.forward(String), and for
OutboundRewrite events, this calls HttpOutboundServletRewrite#setOutboundAddress(String)| Modifier and Type | Method and Description |
|---|---|
ParameterizedPatternParser |
getExpression()
Get the underlying
ParameterizedPatternParser for this Substitute. |
Set<String> |
getRequiredParameterNames() |
void |
performHttp(HttpServletRewrite event,
EvaluationContext context) |
void |
setParameterStore(ParameterStore store) |
static Substitute |
with(String location)
Substitute the current
Address with the given location. |
performandpublic static Substitute with(String location)
Address with the given location.
The given location may be parameterized:
INBOUND:
/example/{param}.html
/css/{value}.css
...
OUTBOUND:
www.example.com/path/file.html
www.example.com/path/{resource}.html
...
location - ParameterizedPattern specifying the new Address.ConfigurationRuleParameterBuilder#where(String)}public void performHttp(HttpServletRewrite event, EvaluationContext context)
performHttp in class HttpOperationpublic ParameterizedPatternParser getExpression()
ParameterizedPatternParser for this Substitute.public Set<String> getRequiredParameterNames()
getRequiredParameterNames in interface Parameterizedpublic void setParameterStore(ParameterStore store)
setParameterStore in interface ParameterizedCopyright © 2016 OCPsoft. All rights reserved.