Created
October 18, 2014 12:27
-
-
Save Shiti/3f7a4d84c2efe606bbcc to your computer and use it in GitHub Desktop.
Akka-Stream example using experimental version 0.7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample.stream | |
import akka.actor.ActorSystem | |
import akka.stream.MaterializerSettings | |
import akka.stream.scaladsl2._ | |
object BasicTransformation { | |
def main(args: Array[String]): Unit = { | |
implicit val system = ActorSystem("Sys") | |
val settings = MaterializerSettings(system) | |
implicit val materializer = FlowMaterializer(settings) | |
val text = | |
"""|Lorem Ipsum is simply dummy text of the printing and typesetting industry. | |
|Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, | |
|when an unknown printer took a galley of type and scrambled it to make a type | |
|specimen book.""".stripMargin | |
val in = text.split("\\s").toIterator | |
FlowFrom(in).map(_.toUpperCase).map(println(_)).consume() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment