Last active
December 10, 2015 11:49
-
-
Save dan-palmer/4430098 to your computer and use it in GitHub Desktop.
hello world akka example
This file contains hidden or 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
object TestAkka extends App { | |
import akka.actor._ | |
class TestActor extends Actor { | |
def receive = { | |
case "hello" => println("hello world") | |
case _ => println("something else") | |
} | |
} | |
val system = ActorSystem("TestSystem") | |
val testActor = system.actorOf(Props[TestActor], name="testactor") | |
testActor ! "hello" | |
testActor ! "arghh" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment