public class LocalRouteRepository extends RouteRepositoryBase<Map<String,Route>> implements RouteRepository
| Constructor and Description |
|---|
LocalRouteRepository()
Creates a new instance of a local in-memory HookRouteRepository.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRoute(String urlPattern,
Route route)
Adds a route for the given url pattern.
|
Set<String> |
getCollections(String parentUri)
Returns a set with collections (routes) contained in the
given parent.
|
Route |
getRoute(String url)
Returns the route which is foreseen
for the given url.
|
Map<String,Route> |
getRoutes()
Returns a copy of all routes.
|
void |
removeRoute(String urlPattern)
Removes the route for the url pattern.
|
public LocalRouteRepository()
public void addRoute(String urlPattern, Route route)
RouteRepositoryaddRoute in interface RouteRepositoryurlPattern - - is used as a key.route - routepublic void removeRoute(String urlPattern)
RouteRepositoryremoveRoute in interface RouteRepositoryurlPattern - urlPatternpublic Route getRoute(String url)
RouteRepositorygetRoute in interface RouteRepositoryurl - urlpublic Map<String,Route> getRoutes()
RouteRepositorygetRoutes in interface RouteRepositorypublic Set<String> getCollections(String parentUri)
RouteRepositorygetCollections in interface RouteRepositoryparentUri - the parent of which the routes should be listedCopyright © 2016–2018. All rights reserved.