#19522 make javadsl.Sink.asPublisher nicer

This commit is contained in:
Roland Kuhn 2016-01-20 21:01:27 +01:00
parent b1351b36ed
commit 9427052fd0
12 changed files with 43 additions and 12 deletions

View file

@ -58,8 +58,8 @@ object Sink {
* If `fanout` is `false` then the materialized `Publisher` will only support a single `Subscriber` and
* reject any additional `Subscriber`s.
*/
def asPublisher[T](fanout: Boolean): Sink[T, Publisher[T]] =
new Sink(scaladsl.Sink.asPublisher(fanout))
def asPublisher[T](fanout: AsPublisher): Sink[T, Publisher[T]] =
new Sink(scaladsl.Sink.asPublisher(fanout == AsPublisher.WITH_FANOUT))
/**
* A `Sink` that will invoke the given procedure for each received element. The sink is materialized