Packages

o

play.core.server.netty

SynchronousMappedStreams

object SynchronousMappedStreams

Source
SynchronousMappedStreams.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SynchronousMappedStreams
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def contramap[A, B](subscriber: Subscriber[B], f: (A) => B): Subscriber[A]

    Contramaps a subscriber using a synchronous function.

    Contramaps a subscriber using a synchronous function.

    This is useful in situations where you want to guarantee that messages that you produce always reach passed to the subscriber are always handled, but can't guarantee that the subscriber being contramapped will always handle them. For example, a subscriber that consumes Netty ByteBuf can't subscribe directly to an Pekko streams publisher since Pekko streams may drop the messages its publishing without giving any opportunity to release the ByteBuf, this can be used to to convert some other immutable message to a ByteBuf for consumption by the Netty subscriber.

  2. def map[A, B](publisher: Publisher[A], f: (A) => B): Publisher[B]

    Maps a publisher using a synchronous function.

    Maps a publisher using a synchronous function.

    This is useful in situations where you want to guarantee that messages produced by the publisher are always handled, but can't guarantee that the subscriber passed to it will always handle them. For example, a publisher that produces Netty ByteBuf can't be fed directly into an Pekko streams subscriber since Pekko streams may drop the message without giving any opportunity to release the ByteBuf, this can be used to consume the ByteBuf and then release it.

  3. def transform[A1, B1, A2, B2](processor: Processor[B1, A2], f: (A1) => B1, g: (A2) => B2): Processor[A1, B2]

    Does a map and contramap on the processor.

    Does a map and contramap on the processor.

    See also

    map and contramap.