Package akka.routing

Examples of akka.routing.BroadcastRouter


   * @param args
   */
  public static void main(String[] args) {
    ActorSystem _system = ActorSystem.create("BroadcastRouterExample");
    ActorRef broadcastRouter = _system.actorOf(new Props(MsgEchoActor.class)
        .withRouter(new BroadcastRouter(5)),"myBroadcastRouterActor");

    for (int i = 1; i <= 2; i++) {
      //same message goes to all the actors
      broadcastRouter.tell(i);
    }
View Full Code Here

TOP

Related Classes of akka.routing.BroadcastRouter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.