|
Akka/Scala example source code file (Receiver.scala)
The Receiver.scala Akka example source code
package sample.remote.benchmark
import akka.actor.Actor
import akka.actor.ActorSystem
import com.typesafe.config.ConfigFactory
import akka.actor.Props
object Receiver {
def main(args: Array[String]): Unit = {
val system = ActorSystem("Sys", ConfigFactory.load("remotelookup"))
system.actorOf(Props[Receiver], "rcv")
}
}
class Receiver extends Actor {
import Sender._
def receive = {
case m: Echo => sender() ! m
case Shutdown => context.system.shutdown()
case _ =>
}
}
Other Akka source code examplesHere is a short list of links related to this Akka Receiver.scala source code file: |
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.