Class PathMatcher$

java.lang.Object
org.apache.pekko.http.scaladsl.server.PathMatcher$
All Implemented Interfaces:
ImplicitPathMatcherConstruction

public class PathMatcher$ extends Object implements ImplicitPathMatcherConstruction
  • Field Details

    • MODULE$

      public static final PathMatcher$ MODULE$
      Static reference to the singleton instance of this Scala object.
  • Constructor Details

    • PathMatcher$

      public PathMatcher$()
  • Method Details

    • provide

      public <L> PathMatcher<L> provide(L extractions, Tuple<L> ev)
      Creates a PathMatcher that always matches, consumes nothing and extracts the given Tuple of values.
      Parameters:
      extractions - (undocumented)
      ev - (undocumented)
      Returns:
      (undocumented)
    • apply

      public <L> PathMatcher<L> apply(Uri.Path prefix, L extractions, Tuple<L> ev)
      Creates a PathMatcher that matches and consumes the given path prefix and extracts the given list of extractions. If the given prefix is empty the returned PathMatcher matches always and consumes nothing.

      Opentelemetry Java Instrumentation relies on this method so avoid changing it. The agent matches on the method name, on the Path first parameter and on the PathMatcher return type, and uses it to derive the http.route attribute. See https://github.com/apache/pekko-http/issues/1241

      Parameters:
      prefix - (undocumented)
      extractions - (undocumented)
      ev - (undocumented)
      Returns:
      (undocumented)
    • apply

      public <L> PathMatcher<L> apply(PathMatcher<L> magnet)
      Provoke implicit conversions to PathMatcher to be applied
    • EmptyMatch

      public PathMatcher.Matched<scala.Tuple1<String>> EmptyMatch()
      The empty match returned when a Regex matcher matches the empty path