fixes #20414 Allow different ActorMaterializer subtypes
This commit is contained in:
parent
47c1b5b9ad
commit
049b95077f
21 changed files with 114 additions and 69 deletions
|
|
@ -4,11 +4,11 @@
|
|||
|
||||
package akka.http.scaladsl.server
|
||||
|
||||
import scala.concurrent.{ Future, ExecutionContextExecutor }
|
||||
import akka.stream.{ ActorMaterializer, Materializer }
|
||||
import scala.concurrent.{ExecutionContextExecutor, Future}
|
||||
import akka.stream.{ActorMaterializer, ActorMaterializerHelper, Materializer}
|
||||
import akka.event.LoggingAdapter
|
||||
import akka.http.scaladsl.settings.{ RoutingSettings, ParserSettings }
|
||||
import akka.http.scaladsl.marshalling.{ Marshal, ToResponseMarshallable }
|
||||
import akka.http.scaladsl.settings.{ParserSettings, RoutingSettings}
|
||||
import akka.http.scaladsl.marshalling.{Marshal, ToResponseMarshallable}
|
||||
import akka.http.scaladsl.model._
|
||||
import akka.http.scaladsl.util.FastFuture
|
||||
import akka.http.scaladsl.util.FastFuture._
|
||||
|
|
@ -29,7 +29,7 @@ private[http] class RequestContextImpl(
|
|||
this(request, request.uri.path, ec, materializer, log, settings, parserSettings)
|
||||
|
||||
def this(request: HttpRequest, log: LoggingAdapter, settings: RoutingSettings)(implicit ec: ExecutionContextExecutor, materializer: Materializer) =
|
||||
this(request, request.uri.path, ec, materializer, log, settings, ParserSettings(ActorMaterializer.downcast(materializer).system))
|
||||
this(request, request.uri.path, ec, materializer, log, settings, ParserSettings(ActorMaterializerHelper.downcast(materializer).system))
|
||||
|
||||
def reconfigure(executionContext: ExecutionContextExecutor, materializer: Materializer, log: LoggingAdapter, settings: RoutingSettings): RequestContext =
|
||||
copy(executionContext = executionContext, materializer = materializer, log = log, routingSettings = settings)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue