Class UriPathRouter<P,T>
- java.lang.Object
-
- org.apache.hc.core5.http.impl.routing.UriPathRouter<P,T>
-
- All Implemented Interfaces:
java.util.function.Function<java.lang.String,T>
final class UriPathRouter<P,T> extends java.lang.Object implements java.util.function.Function<java.lang.String,T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classUriPathRouter.BestMatcher<T>Finds a match for the given path from a collection of URI patterns.(package private) static classUriPathRouter.OrderedMatcher<T>Finds a match for the given path from an ordered collection of URI patterns.(package private) static classUriPathRouter.RegexMatcher<T>Finds a match for the given path from a collection of regular expressions.
-
Field Summary
Fields Modifier and Type Field Description private static PathPatternMatcherPATH_PATTERN_MATCHERprivate java.util.function.BiFunction<java.lang.String,java.util.List<PathRoute<P,T>>,T>pathRouterprivate java.util.List<PathRoute<P,T>>routes
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Tapply(java.lang.String path)(package private) static <T> UriPathRouter<?,T>bestMatch(java.util.List<PathRoute<java.lang.String,T>> routes)(package private) static <T> UriPathRouter<?,T>ordered(java.util.List<PathRoute<java.lang.String,T>> routes)(package private) static <T> UriPathRouter<?,T>regEx(java.util.List<PathRoute<java.lang.String,T>> routes)java.lang.StringtoString()
-
-
-
Method Detail
-
apply
public T apply(java.lang.String path)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
bestMatch
static <T> UriPathRouter<?,T> bestMatch(java.util.List<PathRoute<java.lang.String,T>> routes)
-
ordered
static <T> UriPathRouter<?,T> ordered(java.util.List<PathRoute<java.lang.String,T>> routes)
-
regEx
static <T> UriPathRouter<?,T> regEx(java.util.List<PathRoute<java.lang.String,T>> routes)
-
-