public class SimpleRouteLocator extends Object implements RouteLocator
RouteLocator
based on configuration data held in ZuulProperties
.Constructor and Description |
---|
SimpleRouteLocator(String servletPath,
ZuulProperties properties) |
Modifier and Type | Method and Description |
---|---|
protected void |
doRefresh()
Calculate all the routes and set up a cache for the values.
|
Collection<String> |
getIgnoredPaths()
Ignored route paths (or patterns), if any.
|
Route |
getMatchingRoute(String path)
Maps a path to an actual route with full metadata.
|
List<Route> |
getRoutes()
A map of route path (pattern) to location (e.g.
|
protected Map<String,ZuulProperties.ZuulRoute> |
locateRoutes()
Compute a map of path pattern to route.
|
protected boolean |
matchesIgnoredPatterns(String path) |
public SimpleRouteLocator(String servletPath, ZuulProperties properties)
public List<Route> getRoutes()
RouteLocator
getRoutes
in interface RouteLocator
public Collection<String> getIgnoredPaths()
RouteLocator
getIgnoredPaths
in interface RouteLocator
public Route getMatchingRoute(String path)
RouteLocator
getMatchingRoute
in interface RouteLocator
protected void doRefresh()
RefreshableRouteLocator
.protected Map<String,ZuulProperties.ZuulRoute> locateRoutes()
ZuulProperties
, but subclasses can add dynamic calculations.protected boolean matchesIgnoredPatterns(String path)
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.