akka.stream

Transformer

abstract class Transformer[-T, +U] extends AnyRef

General interface for stream transformation.

It is possible to keep state in the concrete Transformer instance with ordinary instance variables. The Transformer is executed by an actor and therefore you don not have to add any additional thread safety or memory visibility constructs to access the state from the callback methods.

Source
Transformer.scala
See also

akka.stream.javadsl.Flow#transform

akka.stream.scaladsl.Flow#transform

Linear Supertypes
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Transformer
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Transformer()

Abstract Value Members

  1. abstract def onNext(element: T): Seq[U]

    Invoked for each element to produce a (possibly empty) sequence of output elements.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Transformer[T, U] to any2stringadd[Transformer[T, U]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Transformer[T, U], B)

    Implicit information
    This member is added by an implicit conversion from Transformer[T, U] to ArrowAssoc[Transformer[T, U]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def cleanup(): Unit

    Invoked after normal completion or error.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def ensuring(cond: (Transformer[T, U]) ⇒ Boolean, msg: ⇒ Any): Transformer[T, U]

    Implicit information
    This member is added by an implicit conversion from Transformer[T, U] to Ensuring[Transformer[T, U]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (Transformer[T, U]) ⇒ Boolean): Transformer[T, U]

    Implicit information
    This member is added by an implicit conversion from Transformer[T, U] to Ensuring[Transformer[T, U]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): Transformer[T, U]

    Implicit information
    This member is added by an implicit conversion from Transformer[T, U] to Ensuring[Transformer[T, U]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): Transformer[T, U]

    Implicit information
    This member is added by an implicit conversion from Transformer[T, U] to Ensuring[Transformer[T, U]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Transformer[T, U] to StringFormat[Transformer[T, U]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. def isComplete: Boolean

    Invoked after handing off the elements produced from one input element to the downstream consumers to determine whether to end stream processing at this point; in that case the upstream subscription is canceled.

  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. def name: String

    Name of this transformation step.

    Name of this transformation step. Used as part of the actor name. Facilitates debugging and logging.

  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. def onError(cause: Throwable): Unit

    Invoked when failure is signaled from upstream.

    Invoked when failure is signaled from upstream. If this method throws an exception, then onError is immediately propagated downstream. If this method completes normally then Transformer#onTermination is invoked as a final step, passing the original cause.

  26. def onTermination(e: Option[Throwable]): Seq[U]

    Invoked before the Transformer terminates (either normal completion or after an onError) to produce a (possibly empty) sequence of elements in response to the end-of-stream event.

    Invoked before the Transformer terminates (either normal completion or after an onError) to produce a (possibly empty) sequence of elements in response to the end-of-stream event.

    This method is only called if Transformer#onError does not throw an exception. The default implementation of Transformer#onError throws the received cause forcing the error to propagate downstream immediately.

    e

    Contains a non-empty option with the error causing the termination or an empty option if the Transformer was completed normally

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def toString(): String

    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def [B](y: B): (Transformer[T, U], B)

    Implicit information
    This member is added by an implicit conversion from Transformer[T, U] to ArrowAssoc[Transformer[T, U]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Transformer[T, U] to any2stringadd[Transformer[T, U]]

Inherited by implicit conversion StringFormat from Transformer[T, U] to StringFormat[Transformer[T, U]]

Inherited by implicit conversion Ensuring from Transformer[T, U] to Ensuring[Transformer[T, U]]

Inherited by implicit conversion ArrowAssoc from Transformer[T, U] to ArrowAssoc[Transformer[T, U]]

Ungrouped