From b5a813f766d18cd8a414aeb3da11785ef216d9ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Endre=20S=C3=A1ndor=20Varga?= Date: Thu, 9 Jul 2015 11:49:32 +0200 Subject: [PATCH] Other minor improvements --- akka-docs-dev/rst/java/stream-integrations.rst | 4 ++-- akka-docs-dev/rst/scala/stream-integrations.rst | 4 ++-- akka-stream/src/main/scala/akka/stream/javadsl/Tcp.scala | 8 ++++++++ akka-stream/src/main/scala/akka/stream/scaladsl/Tcp.scala | 8 ++++++++ 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/akka-docs-dev/rst/java/stream-integrations.rst b/akka-docs-dev/rst/java/stream-integrations.rst index eaa5519886..afc1a3e5c7 100644 --- a/akka-docs-dev/rst/java/stream-integrations.rst +++ b/akka-docs-dev/rst/java/stream-integrations.rst @@ -37,8 +37,8 @@ stream if there is demand from downstream, otherwise they will be buffered until demand is received. Depending on the defined :class:`OverflowStrategy` it might drop elements if there is no space -available in the buffer. The strategy :class:`OverflowStrategy.backpressure()` is not supported -for this Source type, you should consider using ActorPublisher if you want a backpressured +available in the buffer. The strategy ``OverflowStrategy.backpressure()`` is not supported +for this Source type, you should consider using ``ActorPublisher`` if you want a backpressured actor interface. The stream can be completed successfully by sending ``akka.actor.PoisonPill`` or diff --git a/akka-docs-dev/rst/scala/stream-integrations.rst b/akka-docs-dev/rst/scala/stream-integrations.rst index a0c086bd2c..87f99e07f0 100644 --- a/akka-docs-dev/rst/scala/stream-integrations.rst +++ b/akka-docs-dev/rst/scala/stream-integrations.rst @@ -32,8 +32,8 @@ stream if there is demand from downstream, otherwise they will be buffered until demand is received. Depending on the defined :class:`OverflowStrategy` it might drop elements if there is no space -available in the buffer. The strategy :class:`OverflowStrategy.backpressure` is not supported -for this Source type, you should consider using ActorPublisher if you want a backpressured +available in the buffer. The strategy ``OverflowStrategy.backpressure`` is not supported +for this Source type, you should consider using ``ActorPublisher`` if you want a backpressured actor interface. The stream can be completed successfully by sending ``akka.actor.PoisonPill`` or diff --git a/akka-stream/src/main/scala/akka/stream/javadsl/Tcp.scala b/akka-stream/src/main/scala/akka/stream/javadsl/Tcp.scala index bd3cf2f3b6..794a48e168 100644 --- a/akka-stream/src/main/scala/akka/stream/javadsl/Tcp.scala +++ b/akka-stream/src/main/scala/akka/stream/javadsl/Tcp.scala @@ -100,6 +100,10 @@ class Tcp(system: ExtendedActorSystem) extends akka.actor.Extension { /** * Creates a [[Tcp.ServerBinding]] instance which represents a prospective TCP server binding on the given `endpoint`. * + * Please note that the startup of the server is asynchronous, i.e. after materializing the enclosing + * [[akka.stream.scaladsl.RunnableGraph]] the server is not immediately available. Only after the materialized future + * completes is the server ready to accept client connections. + * * @param interface The interface to listen on * @param port The port to listen on * @param backlog Controls the size of the connection backlog @@ -127,6 +131,10 @@ class Tcp(system: ExtendedActorSystem) extends akka.actor.Extension { /** * Creates a [[Tcp.ServerBinding]] without specifying options. * It represents a prospective TCP server binding on the given `endpoint`. + * + * Please note that the startup of the server is asynchronous, i.e. after materializing the enclosing + * [[akka.stream.scaladsl.RunnableGraph]] the server is not immediately available. Only after the materialized future + * completes is the server ready to accept client connections. */ def bind(interface: String, port: Int): Source[IncomingConnection, Future[ServerBinding]] = Source.adapt(delegate.bind(interface, port) diff --git a/akka-stream/src/main/scala/akka/stream/scaladsl/Tcp.scala b/akka-stream/src/main/scala/akka/stream/scaladsl/Tcp.scala index fdc30ea3c4..13c85c9dbb 100644 --- a/akka-stream/src/main/scala/akka/stream/scaladsl/Tcp.scala +++ b/akka-stream/src/main/scala/akka/stream/scaladsl/Tcp.scala @@ -119,6 +119,10 @@ class Tcp(system: ExtendedActorSystem) extends akka.actor.Extension { /** * Creates a [[Tcp.ServerBinding]] instance which represents a prospective TCP server binding on the given `endpoint`. * + * Please note that the startup of the server is asynchronous, i.e. after materializing the enclosing + * [[akka.stream.scaladsl.RunnableGraph]] the server is not immediately available. Only after the materialized future + * completes is the server ready to accept client connections. + * * @param interface The interface to listen on * @param port The port to listen on * @param backlog Controls the size of the connection backlog @@ -147,6 +151,10 @@ class Tcp(system: ExtendedActorSystem) extends akka.actor.Extension { * Creates a [[Tcp.ServerBinding]] instance which represents a prospective TCP server binding on the given `endpoint` * handling the incoming connections using the provided Flow. * + * Please note that the startup of the server is asynchronous, i.e. after materializing the enclosing + * [[akka.stream.scaladsl.RunnableGraph]] the server is not immediately available. Only after the returned future + * completes is the server ready to accept client connections. + * * @param handler A Flow that represents the server logic * @param interface The interface to listen on * @param port The port to listen on