Skip to content

Java code for scala samples for the Akka In Action book

License

Notifications You must be signed in to change notification settings

chhil/AkkaInAction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AkkaInAction Streams

Java code for scala stream samples for the Akka In Action book.

##Runnable Classes

StreamingCopy

Alt text StreamingCopy.java StreamingCopy.scala

This is a standalone independent class for copying a file from location A to location B. Do change the file name and location as its hard coded and not using commanline arguements. It shows the various ways it can be done and how the materializer is used to determine the outcome. In the ebook its listing 13.2 -13.

EventFilter

In the ebook it is listing 13.7 - 13.13 Alt text

  1. EventFilter.java original EventFilter.scala The main runnable class file that sets up the flows to read a file (source), parse it, filter the lines based on a state, and write to filetered lines in a custom format (sink). Don't use sparay-json, as for understanding the exercise its not needed.

  2. Event.java original Event.scala Not equivalent to Scala code but close to get the general idea.

  3. LogStreamProcessor.java original LogStreamProcessor.scala Currently limited functionality, only whats required for the current exercise.

  4. State.java In the scala world its part of the Event.scala.

BidiEventFilter

Alt text

In the ebook it is listing 13.16 - 13.17

  1. BidiEventFilter.java original BidiEventFilter.scala

The main runnable class, that uses the framing,parsing and filter flows from the previous EventFilter class. Forms a bidiflow using framing and parsing and then joins the filter flow.

  1. LogStreamProcessor.java original LogStreamProcessor.scala

Updated LogStreamProcessor with helper methods.

About

Java code for scala samples for the Akka In Action book

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages