Package akka.http.scaladsl.server
Interface ImplicitPathMatcherConstruction
- All Known Subinterfaces:
Directives
,PathDirectives
- All Known Implementing Classes:
Directives$
,HttpApp
,PathDirectives$
,PathMatcher$
public interface ImplicitPathMatcherConstruction
-
Method Summary
Modifier and TypeMethodDescriptionPathMatcher<scala.Tuple1<String>>
_regex2PathMatcher
(scala.util.matching.Regex regex) Creates a PathMatcher that consumes (a prefix of) the first path segment if the path begins with a segment (a prefix of) which matches the given regex.PathMatcher<scala.runtime.BoxedUnit>
_segmentStringToPathMatcher
(String segment) Creates a PathMatcher that consumes (a prefix of) the first path segment (if the path begins with a segment).<T> PathMatcher<scala.Tuple1<T>>
_stringExtractionPair2PathMatcher
(scala.Tuple2<String, T> tuple) Creates a PathMatcher that consumes (a prefix of) the first path segment (if the path begins with a segment) and extracts a given value.PathMatcher<scala.runtime.BoxedUnit>
<T> PathMatcher<scala.Tuple1<T>>
_valueMap2PathMatcher
(scala.collection.immutable.Map<String, T> valueMap) Creates a PathMatcher from the given Map of path segments (prefixes) to extracted values.
-
Method Details
-
_regex2PathMatcher
Creates a PathMatcher that consumes (a prefix of) the first path segment if the path begins with a segment (a prefix of) which matches the given regex. Extracts either the complete match (if the regex doesn't contain a capture group) or the capture group (if the regex contains exactly one). If the regex contains more than one capture group the method throws an IllegalArgumentException.- Parameters:
regex
- (undocumented)- Returns:
- (undocumented)
-
_segmentStringToPathMatcher
Creates a PathMatcher that consumes (a prefix of) the first path segment (if the path begins with a segment).- Parameters:
segment
- (undocumented)- Returns:
- (undocumented)
-
_stringExtractionPair2PathMatcher
Creates a PathMatcher that consumes (a prefix of) the first path segment (if the path begins with a segment) and extracts a given value.- Parameters:
tuple
- (undocumented)- Returns:
- (undocumented)
-
_stringNameOptionReceptacle2PathMatcher
PathMatcher<scala.runtime.BoxedUnit> _stringNameOptionReceptacle2PathMatcher(NameOptionReceptacle<String> nr) - Parameters:
nr
- (undocumented)- Returns:
- (undocumented)
-
_valueMap2PathMatcher
<T> PathMatcher<scala.Tuple1<T>> _valueMap2PathMatcher(scala.collection.immutable.Map<String, T> valueMap) Creates a PathMatcher from the given Map of path segments (prefixes) to extracted values. If the unmatched path starts with a segment having one of the maps keys as a prefix the matcher consumes this path segment (prefix) and extracts the corresponding map value. For keys sharing a common prefix the longest matching prefix is selected.- Parameters:
valueMap
- (undocumented)- Returns:
- (undocumented)
-