Class PathMatchers
java.lang.Object
org.apache.pekko.http.javadsl.server.PathMatchers
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic PathMatcher1<Double>A PathMatcher that matches and extracts a Double value.static PathMatcher1<Integer>A PathMatcher that efficiently matches a number of hex-digits and extracts their (non-negative) Int value.static PathMatcher1<Long>A PathMatcher that efficiently matches a number of hex-digits and extracts their (non-negative) Long value.static PathMatcher1<Integer>A PathMatcher that efficiently matches a number of digits and extracts their (non-negative) Int value.static PathMatcher1<Long>A PathMatcher that efficiently matches a number of digits and extracts their (non-negative) Long value.static PathMatcher0neutral()A PathMatcher that always matches, doesn't consume anything and extracts nothing.static PathMatcher0pathEnd()A PathMatcher that matches the very end of the requests URI path.static PathMatcher1<String>A PathMatcher that matches and extracts the complete remaining, unmatched part of the request's URI path as an (encoded!)static PathMatcher1<Uri.Path>A PathMatcher that matches and extracts the complete remaining, unmatched part of the request's URI path.static PathMatcher1<String>segment()A PathMatcher that matches if the unmatched path starts with a path segment.static PathMatcher0Creates a PathMatcher that consumes (a prefix of) the first path segment (if the path begins with a segment).static PathMatcher1<String>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.static PathMatcher1<List<String>>segments()A PathMatcher that matches up to 128 remaining segments as a List[String].static PathMatcher1<List<String>>segments(int count) A PathMatcher that matches the given number of path segments (separated by slashes) as a List[String].static PathMatcher1<List<String>>segments(int min, int max) A PathMatcher that matches betweenminandmax(both inclusively) path segments (separated by slashes) as a List[String].static PathMatcher0separateOnSlashes(String segments) Converts a path string containing slashes into a PathMatcher that interprets slashes as path segment separators.static PathMatcher0slash()A PathMatcher that matches a single slash character ('/').static PathMatcher1<UUID>A PathMatcher that matches and extracts a java.util.UUID instance.
- 
Constructor Details- 
PathMatcherspublic PathMatchers()
 
- 
- 
Method Details- 
separateOnSlashesConverts a path string containing slashes into a PathMatcher that interprets slashes as path segment separators.- Parameters:
- segments- (undocumented)
- Returns:
- (undocumented)
 
- 
slashA PathMatcher that matches a single slash character ('/').- Returns:
- (undocumented)
 
- 
segmentCreates a PathMatcher that consumes (a prefix of) the first path segment (if the path begins with a segment).- Parameters:
- segment- (undocumented)
- Returns:
- (undocumented)
 
- 
segmentCreates 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)
 
- 
segmentsA PathMatcher that matches betweenminandmax(both inclusively) path segments (separated by slashes) as a List[String]. If there are more thancountsegments present the remaining ones will be left unmatched. If the path has a trailing slash this slash will *not* be matched.- Parameters:
- min- (undocumented)
- max- (undocumented)
- Returns:
- (undocumented)
 
- 
segmentsA PathMatcher that matches the given number of path segments (separated by slashes) as a List[String]. If there are more thancountsegments present the remaining ones will be left unmatched. If the path has a trailing slash this slash will *not* be matched.- Parameters:
- count- (undocumented)
- Returns:
- (undocumented)
 
- 
integerSegmentA PathMatcher that efficiently matches a number of digits and extracts their (non-negative) Int value. The matcher will not match 0 digits or a sequence of digits that would represent an Int value larger than Int.MaxValue.- Returns:
- (undocumented)
 
- 
longSegmentA PathMatcher that efficiently matches a number of digits and extracts their (non-negative) Long value. The matcher will not match 0 digits or a sequence of digits that would represent an Long value larger than Long.MaxValue.- Returns:
- (undocumented)
 
- 
hexIntegerSegmentA PathMatcher that efficiently matches a number of hex-digits and extracts their (non-negative) Int value. The matcher will not match 0 digits or a sequence of digits that would represent an Int value larger than Int.MaxValue.- Returns:
- (undocumented)
 
- 
hexLongSegmentA PathMatcher that efficiently matches a number of hex-digits and extracts their (non-negative) Long value. The matcher will not match 0 digits or a sequence of digits that would represent an Long value larger than Long.MaxValue.- Returns:
- (undocumented)
 
- 
doubleSegmentA PathMatcher that matches and extracts a Double value. The matched string representation is the pure decimal, optionally signed form of a double value, i.e. without exponent.- Returns:
- (undocumented)
 
- 
uuidSegmentA PathMatcher that matches and extracts a java.util.UUID instance.- Returns:
- (undocumented)
 
- 
neutralA PathMatcher that always matches, doesn't consume anything and extracts nothing. Serves mainly as a neutral element in PathMatcher composition.- Returns:
- (undocumented)
 
- 
pathEndA PathMatcher that matches the very end of the requests URI path.- Returns:
- (undocumented)
 
- 
remainingA PathMatcher that matches and extracts the complete remaining, unmatched part of the request's URI path as an (encoded!) String.- Returns:
- (undocumented)
 
- 
remainingPathA PathMatcher that matches and extracts the complete remaining, unmatched part of the request's URI path.- Returns:
- (undocumented)
 
- 
segmentA PathMatcher that matches if the unmatched path starts with a path segment. If so the path segment is extracted as a String.- Returns:
- (undocumented)
 
- 
segmentsA PathMatcher that matches up to 128 remaining segments as a List[String]. This can also be no segments resulting in the empty list. If the path has a trailing slash this slash will *not* be matched.- Returns:
- (undocumented)
 
 
-