public class DefaultRouter extends Object implements Router
Constructor and Description |
---|
DefaultRouter() |
Modifier and Type | Method and Description |
---|---|
int |
countTemplates()
Return the number of URI templates served by this Router.
|
String |
findItemURIPath(String context,
URI requestURI,
String path)
Answer the filled-in URI template associated with the given
item path, or null if there isn't one.
|
Match |
getMatch(String path,
MultiMap<String,String> queryParams)
Answer the (endpoint, bindings) Match for the given path,
or null if there isn't one.
|
void |
register(String context,
String ut,
APIEndpoint ep)
Register the endpoint ep associated with the URI template ut.
|
List<String> |
templates()
Return a list of URI templates registered with this Router.
|
void |
unregister(String context,
String ut)
Remove a registered api
|
public Match getMatch(String path, MultiMap<String,String> queryParams)
public void register(String context, String ut, APIEndpoint ep)
public void unregister(String context, String ut)
Router
unregister
in interface Router
public String findItemURIPath(String context, URI requestURI, String path)
findItemURIPath
in interface Router
public int countTemplates()
Router
countTemplates
in interface Router
Copyright © 2014. All Rights Reserved.