public class Join extends Object implements Rule, JoinPath, Parameterized
Rule that creates a bi-directional rewrite rule between an externally facing Address and an internal
server resource Address for the purposes of changing the Address with which the internal server
resource is accessible.| Modifier | Constructor and Description |
|---|---|
protected |
Join(String pattern,
boolean requestBinding) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(Rewrite event,
EvaluationContext context) |
static Join |
getCurrentJoin(javax.servlet.http.HttpServletRequest request)
|
String |
getId() |
Set<String> |
getRequiredParameterNames() |
static JoinPath |
path(String pattern)
|
static JoinPath |
pathNonBinding(String pattern)
|
void |
perform(Rewrite event,
EvaluationContext context) |
void |
setParameterStore(ParameterStore store) |
Join |
to(String resource)
The internal server resource
Address to be served when the specified path(String) is
requested. |
String |
toString() |
Join |
withChaining()
Enable the target of this
Join, specified by to(String), to be intercepted by the
path(String) of another Join instance. |
Join |
withInboundCorrection()
Specifies that requests for the original internal resource path specified by
to(String) will be
redirected to the updated path specified by path(String). |
protected Join(String pattern, boolean requestBinding)
public static JoinPath path(String pattern)
Rule specifying the inbound request Address to which this Join will apply. Any
Parameter instances defined in the given pattern will be bound by default to the
ServletRequest.getParameterMap() via the RequestParameterProvider SPI.
To disable RequestBinding parameter Binding, instead use pathNonBinding(String).
The given pattern may be parameterized:
/example/{param}
/example/{param1}/sub/{param2}
...
pattern - ParameterizedPattern matching the requested path.ConfigurationRuleParameterBuilder.where(String)public static JoinPath pathNonBinding(String pattern)
Rule specifying the inbound request Address to which this Join will apply. Any
Parameter instances defined in the given pattern will NOT be bound by default to the
ServletRequest.getParameterMap().
To enable RequestBinding parameter Binding, instead use path(String).
The given pattern may be parameterized:
/example/{param}
/example/{param1}/sub/{param2}
...
pattern - ParameterizedPattern matching the requested path.ConfigurationRuleParameterBuilder.where(String)public static Join getCurrentJoin(javax.servlet.http.HttpServletRequest request)
public Join to(String resource)
JoinPathAddress to be served when the specified path(String) is
requested.
The given resource path may be parameterized:
/example/{param}.html
/css/{value}.css
...
public Join withInboundCorrection()
to(String) will be
redirected to the updated path specified by path(String).public Join withChaining()
Join, specified by to(String), to be intercepted by the
path(String) of another Join instance. If not activated, subsequent matching Join
instances will not be evaluated on the current InboundRewrite instance.public boolean evaluate(Rewrite event, EvaluationContext context)
public void perform(Rewrite event, EvaluationContext context)
public Set<String> getRequiredParameterNames()
getRequiredParameterNames in interface Parameterizedpublic void setParameterStore(ParameterStore store)
setParameterStore in interface ParameterizedCopyright © 2018 OCPsoft. All rights reserved.