#19440 replace Scala Future usage with CompletionStage in javadsl

This entails:

  * adding akka.pattern.PatternCS.* to enable ask etc. with
    CompletionStage
  * changing RequestContext to offer an ExecutionContextExecutor for the
    CompletionStage.*Async combinators
  * splitting up akka.stream.Queue for JavaDSL consistency
This commit is contained in:
Roland Kuhn 2016-01-21 16:37:26 +01:00
parent 396f4370e9
commit 4c72495581
118 changed files with 1646 additions and 1379 deletions

View file

@ -105,9 +105,9 @@ class BasicDirectivesExamplesSpec extends RoutingSpec {
def sample() =
path("sample") {
extractExecutionContext { implicit ec =>
extractExecutionContext { implicit executor =>
complete {
Future(s"Run on ${ec.##}!") // uses the `ec` ExecutionContext
Future(s"Run on ${executor.##}!") // uses the `executor` ExecutionContext
}
}
}
@ -132,9 +132,9 @@ class BasicDirectivesExamplesSpec extends RoutingSpec {
//#extractExecutionContext-0
def sample() =
path("sample") {
extractExecutionContext { implicit ec =>
extractExecutionContext { implicit executor =>
complete {
Future(s"Run on ${ec.##}!") // uses the `ec` ExecutionContext
Future(s"Run on ${executor.##}!") // uses the `executor` ExecutionContext
}
}
}