Remove source/sink fromPublisher/fromSubscriber (#27288)
* Remove source/sink fromPublisher/fromSubscriber Refs #26187 * mima
This commit is contained in:
parent
ba2384893f
commit
09838a71e5
7 changed files with 13 additions and 72 deletions
|
|
@ -6,9 +6,8 @@ package akka.stream.scaladsl
|
|||
|
||||
import java.util.concurrent.CompletionStage
|
||||
|
||||
import akka.actor.{ ActorRef, Cancellable, Props }
|
||||
import akka.actor.{ ActorRef, Cancellable }
|
||||
import akka.annotation.InternalApi
|
||||
import akka.stream.actor.ActorPublisher
|
||||
import akka.stream.impl.Stages.DefaultAttributes
|
||||
import akka.stream.impl.fusing.GraphStages
|
||||
import akka.stream.impl.fusing.GraphStages._
|
||||
|
|
@ -457,21 +456,6 @@ object Source {
|
|||
def asSubscriber[T]: Source[T, Subscriber[T]] =
|
||||
fromGraph(new SubscriberSource[T](DefaultAttributes.subscriberSource, shape("SubscriberSource")))
|
||||
|
||||
/**
|
||||
* Creates a `Source` that is materialized to an [[akka.actor.ActorRef]] which points to an Actor
|
||||
* created according to the passed in [[akka.actor.Props]]. Actor created by the `props` must
|
||||
* be [[akka.stream.actor.ActorPublisher]].
|
||||
*
|
||||
* @deprecated Use `akka.stream.stage.GraphStage` and `fromGraph` instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.
|
||||
*/
|
||||
@deprecated(
|
||||
"Use `akka.stream.stage.GraphStage` and `fromGraph` instead, it allows for all operations an Actor would and is more type-safe as well as guaranteed to be ReactiveStreams compliant.",
|
||||
since = "2.5.0")
|
||||
def actorPublisher[T](props: Props): Source[T, ActorRef] = {
|
||||
require(classOf[ActorPublisher[_]].isAssignableFrom(props.actorClass()), "Actor must be ActorPublisher")
|
||||
fromGraph(new ActorPublisherSource(props, DefaultAttributes.actorPublisherSource, shape("ActorPublisherSource")))
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL API
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue