public class LocalRouteRepository extends RouteRepositoryBase<java.util.Map<java.lang.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(java.lang.String urlPattern,
Route route)
Adds a route for the given url pattern.
|
java.util.Set<java.lang.String> |
getCollections(java.lang.String parentUri)
Returns a set with collections (routes) contained in the
given parent.
|
Route |
getRoute(java.lang.String url)
Returns the route which is foreseen
for the given url.
|
java.util.Map<java.lang.String,Route> |
getRoutes()
Returns a copy of all routes.
|
void |
removeRoute(java.lang.String urlPattern)
Removes the route for the url pattern.
|
public LocalRouteRepository()
public void addRoute(java.lang.String urlPattern,
Route route)
RouteRepositoryaddRoute in interface RouteRepositoryurlPattern - - is used as a key.route - routepublic void removeRoute(java.lang.String urlPattern)
RouteRepositoryremoveRoute in interface RouteRepositoryurlPattern - urlPatternpublic Route getRoute(java.lang.String url)
RouteRepositorygetRoute in interface RouteRepositoryurl - urlpublic java.util.Map<java.lang.String,Route> getRoutes()
RouteRepositorygetRoutes in interface RouteRepositorypublic java.util.Set<java.lang.String> getCollections(java.lang.String parentUri)
RouteRepositorygetCollections in interface RouteRepositoryparentUri - the parent of which the routes should be listed