public class WebRouter<T> extends Object implements Serializable
| Constructor and Description |
|---|
WebRouter() |
| Modifier and Type | Method and Description |
|---|---|
WebRouter<T> |
addRoute(String path,
T destination,
List<String> methods)
Register new route.
|
WebRouter<T> |
get(String path,
T destination)
Register new route.
|
List<HttpRoute<T>> |
getPatterns() |
boolean |
isEmpty() |
RoutingResult<T> |
match(String method,
String path)
Get the path information destination.
|
WebRouter<T> |
post(String path,
T destination)
Register new route.
|
String |
toString() |
public boolean isEmpty()
public RoutingResult<T> match(String method, String path)
method - HTTP methodpath - PATH_INFOpublic WebRouter<T> get(String path, T destination)
path - destination - public WebRouter<T> post(String path, T destination)
path - destination - public WebRouter<T> addRoute(String path, T destination, List<String> methods)
path - PATH_INFOdestination - Destination objectmethods - HTTP methods it should be match.Copyright © 2015. All rights reserved.