|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.continuuity.http.PatternPathRouterWithGroups<T>
T - represents the destination of the routes.public final class PatternPathRouterWithGroups<T>
Matches incoming un-matched paths to destinations. Designed to be used for routing URI paths to http resources. Parameters within braces "{}" are treated as template parameter (a named wild-card pattern).
| Nested Class Summary | |
|---|---|
static class |
PatternPathRouterWithGroups.RoutableDestination<T>
Represents a matched destination. |
| Constructor Summary | |
|---|---|
PatternPathRouterWithGroups()
Initialize PatternPathRouterWithGroups. |
|
| Method Summary | ||
|---|---|---|
void |
add(String source,
T destination)
Add a source and destination. |
|
static
|
create()
|
|
List<PatternPathRouterWithGroups.RoutableDestination<T>> |
getDestinations(String path)
Get a list of destinations and the values matching templated parameter for the given path. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PatternPathRouterWithGroups()
| Method Detail |
|---|
public static <T> PatternPathRouterWithGroups<T> create()
public void add(String source,
T destination)
source - Source path to be routed. Routed path can have named wild-card pattern with braces "{}".destination - Destination of the path.public List<PatternPathRouterWithGroups.RoutableDestination<T>> getDestinations(String path)
path - path to be routed.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||