public class RoutesRegistry extends Object
Constructor and Description |
---|
RoutesRegistry() |
Modifier and Type | Method and Description |
---|---|
List<RouteDefinition> |
getRoutes() |
static RoutesRegistry |
instance() |
static RoutesRegistry |
load() |
RouteResult |
route(String path) |
RouteResult |
routeForEndpoints(StRequest request,
List<RestEndpointBase> endpoints) |
static void |
shutdown() |
HashMap<String,String> |
urlToParamsMap(String[] givenUrlSegments,
String[] routerUrlSegments) |
public RoutesRegistry()
public static RoutesRegistry instance()
public static RoutesRegistry load()
public RouteResult routeForEndpoints(StRequest request, List<RestEndpointBase> endpoints)
public RouteResult route(String path)
public HashMap<String,String> urlToParamsMap(String[] givenUrlSegments, String[] routerUrlSegments)
givenUrlSegments
- An array representing the URL path attempting to be opened (i.e. ["users", "42"])routerUrlSegments
- An array representing a possible URL match for the router (i.e. ["users", ":id"])public static void shutdown()
public List<RouteDefinition> getRoutes()
Copyright © 2016. All rights reserved.