package fucoin; import java.io.File; import java.util.ArrayList; import java.util.List; import akka.actor.ActorRef; import akka.actor.ActorSystem; import com.typesafe.config.Config; import com.typesafe.config.ConfigFactory; import fucoin.actions.join.ServerActionJoin; import fucoin.supervisor.SuperVisorImpl; import fucoin.wallet.WalletImpl; public class Main { public static void main(String[] args) throws InterruptedException { File file = new File("application.conf"); System.out.println("config found? " + file.exists()); Config config = ConfigFactory.parseFile(file); ActorSystem system = ActorSystem.create("Core", config); ActorRef superVisorActor = system.actorOf(SuperVisorImpl.props(),"SuperVisorImpl"); List<ActorRef> activeActors = new ArrayList<>(); ActorRef a1 = system.actorOf(WalletImpl.props(null,"","Main",superVisorActor),"Main"); ActorRef a2 = system.actorOf(WalletImpl.props(a1,"Main","Main2",superVisorActor),"Main2"); superVisorActor.tell(new ServerActionJoin("Main"), a1); superVisorActor.tell(new ServerActionJoin("Main2"), a2); } private static void startSupervisor() { } }