문제

I have an Enumerator in Play Framework 2.1. I would like to have some code executed whenever that Enumerator produces a value.

The documentation is very difficult to understand, but it seems like I need to construct an Iteratee in order to do that, but I can't find actual code that does that anywhere. How do I do this?

도움이 되었습니까?

해결책

Got it!

myEnumerator.run(Iteratee.foreach[TypeToIterateOver] { msg =>
  println(msg)
})
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top