public class HttpMappingRuleBase extends Object implements HttpMappingRule
| Constructor and Description |
|---|
HttpMappingRuleBase(SimplePathTemplate uriTemplate,
String gatewayVersion,
String enabledVersion,
io.fabric8.gateway.loadbalancer.LoadBalancer loadBalancer,
boolean reverseHeaders) |
| Modifier and Type | Method and Description |
|---|---|
void |
addChangeListener(Runnable listener) |
void |
appendMappedServices(Map<String,MappedServices> rules) |
protected void |
fireMappingRulesChanged() |
String |
getGatewayVersion() |
SimplePathTemplate |
getUriTemplate() |
static void |
populateUrlParams(Map<String,String> params,
String service)
Populates the parameters from the URL of the service so they can be reused in the URI template
|
void |
removeChangeListener(Runnable listener) |
String |
toString() |
void |
updateMappingRules(boolean remove,
String path,
List<String> services,
Map<String,String> defaultParams,
ServiceDetails serviceDetails)
Given a path being added or removed, update the services.
|
public HttpMappingRuleBase(SimplePathTemplate uriTemplate, String gatewayVersion, String enabledVersion, io.fabric8.gateway.loadbalancer.LoadBalancer loadBalancer, boolean reverseHeaders)
public static void populateUrlParams(Map<String,String> params, String service)
public void appendMappedServices(Map<String,MappedServices> rules)
appendMappedServices in interface HttpMappingRulepublic String getGatewayVersion()
public SimplePathTemplate getUriTemplate()
public void updateMappingRules(boolean remove,
String path,
List<String> services,
Map<String,String> defaultParams,
ServiceDetails serviceDetails)
updateMappingRules in interface HttpMappingRuleremove - whether to remove (if true) or add (if false) this mappingpath - the path that this mapping is boundservices - the HTTP URLs of the services to map todefaultParams - the default parameters to use in the URI templates such as for version and containerserviceDetails - public void addChangeListener(Runnable listener)
addChangeListener in interface HttpMappingRulepublic void removeChangeListener(Runnable listener)
removeChangeListener in interface HttpMappingRuleprotected void fireMappingRulesChanged()
Copyright © 2011–2014 Red Hat. All rights reserved.