Trait/Object

spray.routing.directives

PathDirectives

Related Docs: object PathDirectives | package directives

Permalink

trait PathDirectives extends PathMatchers with ImplicitPathMatcherConstruction

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PathDirectives
  2. ImplicitPathMatcherConstruction
  3. PathMatchers
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class NumberMatcher[T] extends PathMatcher1[T]

    Permalink
    Definition Classes
    PathMatchers

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val DoubleNumber: PathMatcher1[Double]

    Permalink

    A PathMatcher that matches and extracts a Double value.

    A 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.

    Definition Classes
    PathMatchers
  5. object HexIntNumber extends NumberMatcher[Int]

    Permalink

    A PathMatcher that efficiently matches a number of hex-digits and extracts their (non-negative) Int value.

    A 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.

    Definition Classes
    PathMatchers
  6. object HexLongNumber extends NumberMatcher[Long]

    Permalink

    A PathMatcher that efficiently matches a number of hex-digits and extracts their (non-negative) Long value.

    A 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.

    Definition Classes
    PathMatchers
  7. object IntNumber extends NumberMatcher[Int]

    Permalink

    A PathMatcher that efficiently matches a number of digits and extracts their (non-negative) Int value.

    A 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.

    Definition Classes
    PathMatchers
  8. val JavaUUID: PathMatcher1[UUID]

    Permalink

    A PathMatcher that matches and extracts a java.util.UUID instance.

    A PathMatcher that matches and extracts a java.util.UUID instance.

    Definition Classes
    PathMatchers
  9. object LongNumber extends NumberMatcher[Long]

    Permalink

    A PathMatcher that efficiently matches a number of digits and extracts their (non-negative) Long value.

    A 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.

    Definition Classes
    PathMatchers
  10. val Neutral: PathMatcher0

    Permalink

    A PathMatcher that always matches, doesn't consume anything and extracts nothing.

    A PathMatcher that always matches, doesn't consume anything and extracts nothing. Serves mainly as a neutral element in PathMatcher composition.

    Definition Classes
    PathMatchers
  11. object PathEnd extends PathMatcher0

    Permalink

    A PathMatcher that matches the very end of the requests URI path.

    A PathMatcher that matches the very end of the requests URI path.

    Definition Classes
    PathMatchers
  12. object Rest extends PathMatcher1[String]

    Permalink

    A PathMatcher that matches and extracts the complete remaining, unmatched part of the request's URI path as an (encoded!) String.

    A PathMatcher that matches and extracts the complete remaining, unmatched part of the request's URI path as an (encoded!) String. If you need access to the remaining unencoded elements of the path use the RestPath matcher!

    Definition Classes
    PathMatchers
  13. object RestPath extends PathMatcher1[Path]

    Permalink

    A PathMatcher that matches and extracts the complete remaining, unmatched part of the request's URI path.

    A PathMatcher that matches and extracts the complete remaining, unmatched part of the request's URI path.

    Definition Classes
    PathMatchers
  14. object Segment extends PathMatcher1[String]

    Permalink

    A PathMatcher that matches if the unmatched path starts with a path segment.

    A PathMatcher that matches if the unmatched path starts with a path segment. If so the path segment is extracted as a String.

    Definition Classes
    PathMatchers
  15. val Segments: PathMatcher1[List[String]]

    Permalink

    A PathMatcher that matches all remaining segments as a List[String].

    A PathMatcher that matches all 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.

    Definition Classes
    PathMatchers
  16. object Slash extends PathMatcher0

    Permalink

    A PathMatcher that matches a single slash character ('/').

    A PathMatcher that matches a single slash character ('/').

    Definition Classes
    PathMatchers
  17. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  18. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. def nothingMatcher[L <: HList]: PathMatcher[L]

    Permalink

    A PathMatcher that never matches.

    A PathMatcher that never matches.

    Definition Classes
    PathMatchers
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  29. def path[L <: HList](pm: PathMatcher[L]): Directive[L]

    Permalink

    Tries to consume a leading slash from the unmatched path of the spray.routing.RequestContext before applying the given matcher.

    Tries to consume a leading slash from the unmatched path of the spray.routing.RequestContext before applying the given matcher. The matcher has to match the remaining path completely or leave only a single trailing slash. If matched the value extracted by the PathMatcher is extracted on the directive level.

  30. def pathEnd: Directive0

    Permalink

    Rejects the request if the unmatchedPath of the spray.RequestContext is non-empty, or said differently: only passes on the request to its inner route if the request path has been matched completely.

  31. def pathEndOrSingleSlash: Directive0

    Permalink

    Only passes on the request to its inner route if the request path has been matched completely or only consists of exactly one remaining slash.

  32. def pathPrefix[L <: HList](pm: PathMatcher[L]): Directive[L]

    Permalink

    Tries to consume a leading slash from the unmatched path of the spray.routing.RequestContext before applying the given matcher.

    Tries to consume a leading slash from the unmatched path of the spray.routing.RequestContext before applying the given matcher. The matcher has to match a prefix of the remaining path. If matched the value extracted by the PathMatcher is extracted on the directive level.

  33. def pathPrefixTest[L <: HList](pm: PathMatcher[L]): Directive[L]

    Permalink

    Checks whether the unmatchedPath of the spray.RequestContext has a prefix matched by the given PathMatcher.

    Checks whether the unmatchedPath of the spray.RequestContext has a prefix matched by the given PathMatcher. In analogy to the pathPrefix directive a leading slash is implied.

  34. def pathSingleSlash: Directive0

    Permalink

    Only passes on the request to its inner route if the request path consists of exactly one remaining slash.

  35. def pathSuffix[L <: HList](pm: PathMatcher[L]): Directive[L]

    Permalink

    Rejects the request if the unmatchedPath of the spray.RequestContext does not have a suffix matched the given PathMatcher.

    Rejects the request if the unmatchedPath of the spray.RequestContext does not have a suffix matched the given PathMatcher. If matched the value extracted by the PathMatcher is extracted and the matched parts of the path are consumed. Note that, for efficiency reasons, the given PathMatcher must match the desired suffix in reversed-segment order, i.e. pathSuffix("baz" / "bar") would match /foo/bar/baz!

  36. def pathSuffixTest[L <: HList](pm: PathMatcher[L]): Directive[L]

    Permalink

    Checks whether the unmatchedPath of the spray.RequestContext has a suffix matched by the given PathMatcher.

    Checks whether the unmatchedPath of the spray.RequestContext has a suffix matched by the given PathMatcher. However, as opposed to the pathSuffix directive the matched path is not actually "consumed". Note that, for efficiency reasons, the given PathMatcher must match the desired suffix in reversed-segment order, i.e. pathSuffixTest("baz" / "bar") would match /foo/bar/baz!

  37. def rawPathPrefix[L <: HList](pm: PathMatcher[L]): Directive[L]

    Permalink

    Applies the given matcher directly to the unmatched path of the spray.routing.RequestContext (i.e.

    Applies the given matcher directly to the unmatched path of the spray.routing.RequestContext (i.e. without implicitly consuming a leading slash). The matcher has to match a prefix of the remaining path. If matched the value extracted by the PathMatcher is extracted on the directive level.

  38. def rawPathPrefixTest[L <: HList](pm: PathMatcher[L]): Directive[L]

    Permalink

    Checks whether the unmatchedPath of the spray.RequestContext has a prefix matched by the given PathMatcher.

    Checks whether the unmatchedPath of the spray.RequestContext has a prefix matched by the given PathMatcher. However, as opposed to the pathPrefix directive the matched path is not actually "consumed".

  39. implicit def regex2PathMatcher(regex: Regex): PathMatcher1[String]

    Permalink

    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.

    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.

    Definition Classes
    ImplicitPathMatcherConstruction
  40. implicit def segmentStringToPathMatcher(segment: String): PathMatcher0

    Permalink

    Creates a PathMatcher that consumes (a prefix of) the first path segment (if the path begins with a segment).

    Creates a PathMatcher that consumes (a prefix of) the first path segment (if the path begins with a segment).

    Definition Classes
    ImplicitPathMatcherConstruction
  41. def separateOnSlashes(string: String): PathMatcher0

    Permalink

    Converts a path string containing slashes into a PathMatcher that interprets slashes as path segment separators.

    Converts a path string containing slashes into a PathMatcher that interprets slashes as path segment separators.

    Definition Classes
    PathMatchers
  42. implicit def stringExtractionPair2PathMatcher[T](tuple: (String, T)): PathMatcher1[T]

    Permalink

    Creates a PathMatcher that consumes (a prefix of) the first path segment (if the path begins with a segment) and extracts a given value.

    Creates a PathMatcher that consumes (a prefix of) the first path segment (if the path begins with a segment) and extracts a given value.

    Definition Classes
    ImplicitPathMatcherConstruction
  43. implicit def stringOptionNameReceptacle2PathMatcher(nr: NameReceptacle[Option[String]]): PathMatcher0

    Permalink
  44. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  45. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  46. implicit def valueMap2PathMatcher[T](valueMap: Map[String, T]): PathMatcher1[T]

    Permalink

    Creates a PathMatcher from the given Map of path segments (prefixes) to extracted values.

    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.

    Definition Classes
    ImplicitPathMatcherConstruction
  47. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  48. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def PathElement: Segment.type

    Permalink
    Definition Classes
    PathMatchers
    Annotations
    @deprecated
    Deprecated

    (Since version 1.0-M8/1.1-M8) Use Segment instead

Inherited from PathMatchers

Inherited from AnyRef

Inherited from Any

Ungrouped