public class HttpMappingRuleBase extends Object implements io.fabric8.gateway.handlers.http.HttpMappingRule
| Constructor and Description |
|---|
HttpMappingRuleBase(io.fabric8.zookeeper.internal.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,io.fabric8.gateway.handlers.http.MappedServices> rules) |
protected void |
fireMappingRulesChanged() |
String |
getGatewayVersion() |
io.fabric8.zookeeper.internal.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,
io.fabric8.gateway.ServiceDetails serviceDetails)
Given a path being added or removed, update the services.
|
public static void populateUrlParams(Map<String,String> params, String service)
public void appendMappedServices(Map<String,io.fabric8.gateway.handlers.http.MappedServices> rules)
appendMappedServices in interface io.fabric8.gateway.handlers.http.HttpMappingRulepublic String getGatewayVersion()
public io.fabric8.zookeeper.internal.SimplePathTemplate getUriTemplate()
public void updateMappingRules(boolean remove,
String path,
List<String> services,
Map<String,String> defaultParams,
io.fabric8.gateway.ServiceDetails serviceDetails)
updateMappingRules in interface io.fabric8.gateway.handlers.http.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 io.fabric8.gateway.handlers.http.HttpMappingRulepublic void removeChangeListener(Runnable listener)
removeChangeListener in interface io.fabric8.gateway.handlers.http.HttpMappingRuleprotected void fireMappingRulesChanged()
Copyright © 2011–2014 Red Hat. All rights reserved.