Tutorial pt3
This commit is contained in:
parent
8ae34e56f8
commit
d90f73e45b
20 changed files with 629 additions and 74 deletions
|
|
@ -7,12 +7,17 @@ package tutorial_3
|
|||
import akka.actor.{ Actor, ActorLogging, ActorRef, Props, Terminated }
|
||||
import tutorial_3.DeviceManager.RequestTrackDevice
|
||||
|
||||
//#device-manager-full
|
||||
//#device-manager-msgs
|
||||
object DeviceManager {
|
||||
//#device-manager-msgs
|
||||
def props(): Props = Props(new DeviceManager)
|
||||
|
||||
//#device-manager-msgs
|
||||
final case class RequestTrackDevice(groupId: String, deviceId: String)
|
||||
case object DeviceRegistered
|
||||
}
|
||||
//#device-manager-msgs
|
||||
|
||||
class DeviceManager extends Actor with ActorLogging {
|
||||
var groupIdToActor = Map.empty[String, ActorRef]
|
||||
|
|
@ -45,3 +50,4 @@ class DeviceManager extends Actor with ActorLogging {
|
|||
}
|
||||
|
||||
}
|
||||
//#device-manager-full
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue