What is the difference between Typed and UnTyped Actors in Akka? When to use what?

后端 未结 4 2027
我在风中等你
我在风中等你 2021-02-03 22:53

I have tried to read the Akka documentation to find out the exact difference between Typed and Untyped actors. When to use what? I am not sure what I\'m missing. Can somebody po

4条回答
  •  春和景丽
    2021-02-03 23:26

    UntypedActor is simply the name for Actor but as the Java API.

    Here are some links to documentation:

    Java:

    • http://akka.io/docs/akka/1.2/java/typed-actors.html
    • http://akka.io/docs/akka/1.2/java/untyped-actors.html

    Scala:

    • http://akka.io/docs/akka/1.2/scala/typed-actors.html
    • http://akka.io/docs/akka/1.2/scala/actors.html

    The difference is that TypedActors have a static interface, and the invocations of the methods on that interface is transformed into message sends. UntypedActors can receive any message.

    Hope that helps.

    Cheers, √

提交回复
热议问题