abstract class BasicDirectives extends AnyRef

Source
BasicDirectives.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BasicDirectives
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new BasicDirectives()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from BasicDirectives toany2stringadd[BasicDirectives] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (BasicDirectives, B)
    Implicit
    This member is added by an implicit conversion from BasicDirectives toArrowAssoc[BasicDirectives] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def cancelRejection(rejection: Rejection, inner: Supplier[Route]): Route

    Adds a TransformationRejection cancelling all rejections equal to the given one to the list of rejections potentially coming back from the inner route.

  8. def cancelRejections(filter: Predicate[Rejection], inner: Supplier[Route]): Route

    Adds a TransformationRejection cancelling all rejections for which the given filter function returns true to the list of rejections potentially coming back from the inner route.

  9. def cancelRejections(classes: Iterable[Class[_]], inner: Supplier[Route]): Route

    Adds a TransformationRejection cancelling all rejections of one of the given classes to the list of rejections potentially coming back from the inner route.

  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  11. def ensuring(cond: (BasicDirectives) => Boolean, msg: => Any): BasicDirectives
    Implicit
    This member is added by an implicit conversion from BasicDirectives toEnsuring[BasicDirectives] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (BasicDirectives) => Boolean): BasicDirectives
    Implicit
    This member is added by an implicit conversion from BasicDirectives toEnsuring[BasicDirectives] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: => Any): BasicDirectives
    Implicit
    This member is added by an implicit conversion from BasicDirectives toEnsuring[BasicDirectives] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): BasicDirectives
    Implicit
    This member is added by an implicit conversion from BasicDirectives toEnsuring[BasicDirectives] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. def extract[T](extract: Function[RequestContext, T], inner: Function[T, Route]): Route

    Extracts a single value using the given function.

  18. def extractActorSystem(inner: Function[ActorSystem, Route]): Route

    Extracts the akka.actor.ActorSystem if the available Materializer is an akka.stream.ActorMaterializer.

    Extracts the akka.actor.ActorSystem if the available Materializer is an akka.stream.ActorMaterializer. Otherwise throws an exception as it won't be able to extract the system from arbitrary materializers.

  19. def extractDataBytes(inner: Function[Source[ByteString, Any], Route]): RouteAdapter

    Extracts the entities dataBytes akka.stream.javadsl.Source from the akka.http.javadsl.server.RequestContext.

  20. def extractEntity(inner: Function[RequestEntity, Route]): Route

    Extracts the current http request entity.

    Extracts the current http request entity.

    Annotations
    @CorrespondsTo()
  21. def extractExecutionContext(inner: Function[ExecutionContextExecutor, Route]): Route

    Extracts the ExecutionContextExecutor from the RequestContext.

  22. def extractLog(inner: Function[LoggingAdapter, Route]): Route

    Extracts the LoggingAdapter

  23. def extractMatchedPath(inner: Function[String, Route]): RouteAdapter

    Extracts the already matched path from the RequestContext.

  24. def extractMaterializer(inner: Function[Materializer, Route]): Route

    Extracts the Materializer from the RequestContext.

  25. def extractParserSettings(inner: Function[ParserSettings, Route]): RouteAdapter

    Extracts the akka.http.javadsl.settings.ParserSettings from the akka.http.javadsl.server.RequestContext.

  26. def extractRequest(inner: Function[HttpRequest, Route]): RouteAdapter

    Extracts the current HttpRequest instance.

  27. def extractRequestContext(inner: Function[RequestContext, Route]): RouteAdapter

    Extracts the akka.http.javadsl.server.RequestContext itself.

  28. def extractRequestEntity(inner: Function[RequestEntity, Route]): Route

    Extracts the akka.http.javadsl.model.RequestEntity from the akka.http.javadsl.server.RequestContext.

  29. def extractSettings(inner: Function[RoutingSettings, Route]): RouteAdapter

    Extracts the RoutingSettings from the akka.http.javadsl.server.RequestContext.

  30. def extractStrictEntity(timeout: FiniteDuration, maxBytes: Long, inner: Function[Strict, Route]): Route

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    To help protect against excessive memory use, the request will be aborted if the request is larger than allowed by the akka.http.parsing.max-to-strict-bytes configuration setting.

    Converts the HttpEntity from the akka.http.javadsl.server.RequestContext into an akka.http.javadsl.model.HttpEntity.Strict and extracts it, or fails the route if unable to drain the entire request body within the timeout.

    timeout

    The directive is failed if the stream isn't completed after the given timeout.

  31. def extractStrictEntity(timeout: FiniteDuration, inner: Function[Strict, Route]): Route

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    To help protect against excessive memory use, the request will be aborted if the request is larger than allowed by the akka.http.parsing.max-to-strict-bytes configuration setting.

    Converts the HttpEntity from the akka.http.javadsl.server.RequestContext into an akka.http.javadsl.model.HttpEntity.Strict and extracts it, or fails the route if unable to drain the entire request body within the timeout.

    timeout

    The directive is failed if the stream isn't completed after the given timeout.

  32. def extractUnmatchedPath(inner: Function[String, Route]): RouteAdapter

    Extracts the yet unmatched path from the RequestContext.

  33. def extractUri(inner: Function[Uri, Route]): RouteAdapter

    Extracts the complete request URI.

  34. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  35. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  36. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  37. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  38. def mapInnerRoute(f: Function[Route, Route], inner: Supplier[Route]): Route
  39. def mapRejections(f: Function[List[Rejection], List[Rejection]], inner: Supplier[Route]): Route
  40. def mapRequest(f: Function[HttpRequest, HttpRequest], inner: Supplier[Route]): Route
  41. def mapRequestContext(f: Function[RequestContext, RequestContext], inner: Supplier[Route]): Route
  42. def mapResponse(f: Function[HttpResponse, HttpResponse], inner: Supplier[Route]): Route
  43. def mapResponseEntity(f: Function[ResponseEntity, ResponseEntity], inner: Supplier[Route]): Route
  44. def mapResponseHeaders(f: Function[List[HttpHeader], List[HttpHeader]], inner: Supplier[Route]): Route
  45. def mapRouteResult(f: Function[RouteResult, RouteResult], inner: Supplier[Route]): Route
  46. def mapRouteResultFuture(f: Function[CompletionStage[RouteResult], CompletionStage[RouteResult]], inner: Supplier[Route]): Route
  47. def mapRouteResultPF(f: PartialFunction[RouteResult, RouteResult], inner: Supplier[Route]): Route
  48. def mapRouteResultWith(f: Function[RouteResult, CompletionStage[RouteResult]], inner: Supplier[Route]): Route
  49. def mapRouteResultWithPF(f: PartialFunction[RouteResult, CompletionStage[RouteResult]], inner: Supplier[Route]): Route
  50. def mapSettings(f: Function[RoutingSettings, RoutingSettings], inner: Supplier[Route]): Route

    Runs the inner route with settings mapped by the given function.

  51. def mapUnmatchedPath(f: Function[String, String], inner: Supplier[Route]): Route

    Transforms the unmatchedPath of the RequestContext using the given function.

  52. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  53. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  54. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  55. def pass(inner: Supplier[Route]): Route

    Always passes the request on to its inner route (i.e.

    Always passes the request on to its inner route (i.e. does nothing with the request or the response).

  56. def provide[T](t: T, inner: Function[T, Route]): Route

    Injects the given value into a directive.

  57. def recoverRejections(f: Function[Iterable[Rejection], RouteResult], inner: Supplier[Route]): Route
  58. def recoverRejectionsWith(f: Function[Iterable[Rejection], CompletionStage[RouteResult]], inner: Supplier[Route]): Route
  59. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  60. def toStrictEntity(timeout: FiniteDuration, maxBytes: Long, inner: Supplier[Route]): Route

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    To help protect against excessive memory use, the request will be aborted if the request is larger than allowed by the akka.http.parsing.max-to-strict-bytes configuration setting.

    Extracts the akka.http.javadsl.server.RequestContext itself with the strict HTTP entity, or fails the route if unable to drain the entire request body within the timeout.

    timeout

    The directive is failed if the stream isn't completed after the given timeout.

  61. def toStrictEntity(timeout: FiniteDuration, inner: Supplier[Route]): Route

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    WARNING: This will read the entire request entity into memory and effectively disable streaming.

    To help protect against excessive memory use, the request will be aborted if the request is larger than allowed by the akka.http.parsing.max-to-strict-bytes configuration setting.

    Extracts the akka.http.javadsl.server.RequestContext itself with the strict HTTP entity, or fails the route if unable to drain the entire request body within the timeout.

    timeout

    The directive is failed if the stream isn't completed after the given timeout.

  62. def toString(): String
    Definition Classes
    AnyRef → Any
  63. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  64. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  65. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  66. def withExecutionContext(ec: ExecutionContextExecutor, inner: Supplier[Route]): Route

    Runs its inner route with the given alternative scala.concurrent.ExecutionContextExecutor.

  67. def withLog(log: LoggingAdapter, inner: Supplier[Route]): Route

    Runs its inner route with the given alternative LoggingAdapter.

  68. def withMaterializer(mat: Materializer, inner: Supplier[Route]): Route

    Runs its inner route with the given alternative akka.stream.Materializer.

  69. def withSettings(s: RoutingSettings, inner: Supplier[Route]): Route

    Runs its inner route with the given alternative RoutingSettings.

Deprecated Value Members

  1. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from BasicDirectives toStringFormat[BasicDirectives] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  2. def [B](y: B): (BasicDirectives, B)
    Implicit
    This member is added by an implicit conversion from BasicDirectives toArrowAssoc[BasicDirectives] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromBasicDirectives to any2stringadd[BasicDirectives]

Inherited by implicit conversion StringFormat fromBasicDirectives to StringFormat[BasicDirectives]

Inherited by implicit conversion Ensuring fromBasicDirectives to Ensuring[BasicDirectives]

Inherited by implicit conversion ArrowAssoc fromBasicDirectives to ArrowAssoc[BasicDirectives]

Ungrouped