The details in the construction of the router are the pillars for the routes of this router, and not the router itself.
You can just do something like:
system.actorOf(new Props(new UntypedActorFactory() { public UntypedActor create() { return new MyActor("foo", "bar"); } }).withRouter(...))
And all routes will be of type MyActor with the specified constructor.
You can do anything with the help of props, which you usually can. See Akk Documents for more information.
BjΓΆrn Antonsson
source share