February 2018
Intermediate to advanced
552 pages
13h 46m
English
Before creating an Actor and performing its operations, we need to define it.
In the Akka Toolkit, we can define an Actor class by extending the Actor Trait and providing implementation for the receive method, as follows:
class SampleActor extends Actor {
def receive: Receive = {
//Implmentation
}
}
Here's the description:
def receive: PartialFunction[Any,Unit] = ???
Alternatively, we can use the following simple syntax:
def receive: Receive= ???
Read now
Unlock full access