Search code examples
scalaakkarx-scala

How can I make an actor class to observable in scala


I've tried to make my actor class observable (extends Actor with Observable[T]). However, there is an error message that I have to implement the asJavaObserver value but there is no asJavaObserver in observable trait.


Solution

  • Aren't you mixing two separate programming paradigms? Actors only communicate by messages. So if anyone is interested in the state change of an actor it must receive a message from the actor.

    The observable stuff is for other OO programs which don't use Actor model.