!str #16039 Remove old scaladsl, rename scaladsl2

* and impl2, testkit2
* keeping io2 for now
This commit is contained in:
Patrik Nordwall 2014-10-27 14:35:41 +01:00
parent 5562ceb94b
commit 7c0c618791
221 changed files with 1540 additions and 7985 deletions

View file

@ -21,7 +21,7 @@ class HttpServerExampleSpec
import akka.io.IO
import akka.pattern.ask
import akka.stream.FlowMaterializer
import akka.stream.scaladsl.Flow
import akka.stream.scaladsl.Source
implicit val system = ActorSystem()
import system.dispatcher
@ -31,7 +31,7 @@ class HttpServerExampleSpec
val bindingFuture = IO(Http) ? Http.Bind(interface = "localhost", port = 8080)
bindingFuture foreach {
case Http.ServerBinding(localAddress, connectionStream)
Flow(connectionStream).foreach({
Source(connectionStream).foreach({
case Http.IncomingConnection(remoteAddress, requestProducer, responseConsumer)
println("Accepted new connection from " + remoteAddress)
@ -45,7 +45,8 @@ class HttpServerExampleSpec
import akka.io.IO
import akka.pattern.ask
import akka.stream.FlowMaterializer
import akka.stream.scaladsl.Flow
import akka.stream.scaladsl.Source
import akka.stream.scaladsl.Sink
implicit val system = ActorSystem()
import system.dispatcher
@ -71,11 +72,11 @@ class HttpServerExampleSpec
// ...
bindingFuture foreach {
case Http.ServerBinding(localAddress, connectionStream)
Flow(connectionStream).foreach({
Source(connectionStream).foreach({
case Http.IncomingConnection(remoteAddress, requestProducer, responseConsumer)
println("Accepted new connection from " + remoteAddress)
Flow(requestProducer).map(requestHandler).produceTo(responseConsumer)
Source(requestProducer).map(requestHandler).connect(Sink(responseConsumer)).run()
})
}
//#full-server-example