#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

@ -4,9 +4,9 @@
package akka.http.javadsl.server
import scala.concurrent.Future
import akka.actor.ActorSystem
import akka.http.scaladsl.Http.ServerBinding
import java.util.concurrent.CompletionStage
/**
* A convenience class to derive from to get everything from HttpService and Directives into scope.
@ -22,6 +22,6 @@ abstract class HttpApp
* Starts an HTTP server on the given interface and port. Creates the route by calling the
* user-implemented [[createRoute]] method and uses the route to handle requests of the server.
*/
def bindRoute(interface: String, port: Int, system: ActorSystem): Future[ServerBinding] =
def bindRoute(interface: String, port: Int, system: ActorSystem): CompletionStage[ServerBinding] =
bindRoute(interface, port, createRoute(), system)
}