I have a akka http project.
I need to send akka actor msg in a Route class: RcmdRoutes.
object WebServer extends Directives {
val routes = BaseRoutes.baseRoutes ~
new RcmdRoutes(system).rcmdRoutes ~
SimpleRoutes.simpleRoutes
def main(args: Array[String]) {
implicit val system = ActorSystem("recommed_System")
implicit val materializer = ActorMaterializer()
implicit val executionContext = system.dispatcher
...
}
class RcmdRoutes(system: ActorSystem) extends Directives with JsonSupport {
val actor = system.actorOf(Props[RcmdActor], name = "RcmdActor")
...
}
Question: how can I init the RcmdRoutes class and pass system parameters or I
can create an actor not
need to pass system to the RcmdRoutes class?
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.