Created
May 13, 2015 18:38
-
-
Save pjazdzewski1990/744f83aefecec59a3222 to your computer and use it in GitHub Desktop.
This file contains 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 FridgeKey extends ServiceKey[FridgeCommand] | |
val receptionist: ActorRef[Receptionist.Command] = ctx.spawn(Props(Receptionist.behavior), "receptionist") | |
val human: ActorRef[Receptionist.Listing[FridgeCommand]] = _ | |
val fridge: ActorRef[Receptionist.Registered[FridgeCommand]] = _ | |
receptionist ! Register(key = FridgeKey, address = fridge)(replyTo = fridge) | |
receptionist ! Find(key = FridgeKey)(replyTo = human) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment