= str - #15621 - Moving FlowMaterializer argument to the end of all Flow and Duct methods which uses it.

This commit is contained in:
Viktor Klang 2014-07-17 18:11:12 +02:00
parent 2ccf028a94
commit bb8ab0a925
33 changed files with 106 additions and 109 deletions

View file

@ -47,7 +47,7 @@ private[http] class HttpClientPipeline(effectiveSettings: ClientConnectionSettin
.transform(responseRendererFactory.newRenderer)
.flatten(FlattenStrategy.concat)
.transform(errorLogger(log, "Outgoing request stream error"))
.produceTo(materializer, tcpConn.outputStream)
.produceTo(tcpConn.outputStream, materializer)
val responsePublisher =
Flow(tcpConn.inputStream)

View file

@ -167,7 +167,7 @@ object HttpEntity {
*/
def apply(contentType: ContentType, chunks: Publisher[ByteString], materializer: FlowMaterializer): Chunked =
Chunked(contentType, Flow(chunks).collect[ChunkStreamPart] {
case b: ByteString if b.nonEmpty => Chunk(b)
case b: ByteString if b.nonEmpty Chunk(b)
}.toPublisher(materializer))
}

View file

@ -59,7 +59,7 @@ private[http] class HttpServerPipeline(settings: ServerSettings,
.transform(responseRendererFactory.newRenderer)
.flatten(FlattenStrategy.concat)
.transform(errorLogger(log, "Outgoing response stream error"))
.produceTo(materializer, tcpConn.outputStream)
.produceTo(tcpConn.outputStream, materializer)
Http.IncomingConnection(tcpConn.remoteAddress, requestPublisher, responseSubscriber)
}

View file

@ -48,7 +48,7 @@ public abstract class JavaTestServer {
return JavaApiTestCases.handleRequest(request);
}
})
.produceTo(materializer, conn.getResponseSubscriber());
.produceTo(conn.getResponseSubscriber(), materializer);
}
}).consume(materializer);
}

View file

@ -37,7 +37,7 @@ object TestClient extends App {
} yield response.header[headers.Server]
def sendRequest(request: HttpRequest, connection: Http.OutgoingConnection): Future[HttpResponse] = {
Flow(List(HttpRequest() -> 'NoContext)).produceTo(materializer, connection.processor)
Flow(List(HttpRequest() -> 'NoContext)).produceTo(connection.processor, materializer)
Flow(connection.processor).map(_._1).toFuture(materializer)
}

View file

@ -39,7 +39,7 @@ object TestServer extends App {
Flow(connectionStream).foreach {
case Http.IncomingConnection(remoteAddress, requestPublisher, responseSubscriber)
println("Accepted new connection from " + remoteAddress)
Flow(requestPublisher).map(requestHandler).produceTo(materializer, responseSubscriber)
Flow(requestPublisher).map(requestHandler).produceTo(responseSubscriber, materializer)
}.consume(materializer)
}