Package org.akka.essentials.supervisor.example3

Source Code of org.akka.essentials.supervisor.example3.MyActorSystem

package org.akka.essentials.supervisor.example3;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;

public class MyActorSystem {

  /**
   * @param args
   * @throws Exception
   */
  public static void main(String[] args) throws Exception {
    ActorSystem system = ActorSystem.create("faultTolerance");

    ActorRef supervisor = system.actorOf(new Props(SupervisorActor.class),
        "supervisor");

    supervisor.tell(Integer.valueOf(10));
    supervisor.tell("10");

    Thread.sleep(5000);

    supervisor.tell(Integer.valueOf(10));

    system.shutdown();
  }

}
TOP

Related Classes of org.akka.essentials.supervisor.example3.MyActorSystem

TOP
Copyright © 2018 www.massapi.com. 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.