Package akka.actor

Examples of akka.actor.UntypedActorFactory


            this.injector = injector;
        }

        @Override
        public ActorRef get() {
            return Akka.system().actorOf(new Props(new UntypedActorFactory() {
                public T create() {
                    return injector.getInstance(Key.get(uta));
                }
            }));
        }
View Full Code Here


    // the system
    final ActorRef listener = system.actorOf(new Props(Listener.class),
        "listener");

    // create the master
    ActorRef master = system.actorOf(new Props(new UntypedActorFactory() {
      private static final long serialVersionUID = 1L;

      public UntypedActor create() {
        return new Master(nrOfWorkers, nrOfMessages, nrOfElements,
            listener);
View Full Code Here

  /**
   * @param args
   */
  public static void main(String[] args) {
    ActorRef actor = actorOf(new UntypedActorFactory() {
      public UntypedActor create() {
        return new WCMapReduceApp(10,
            "/Users/brlee/Workspace/WordCountFiles", 3);
      }
    });
View Full Code Here

        .actorFor("akka://ServerSys@127.0.0.1:2552/user/serverActor");

    log.info("ServerActor with hashcode #" + remoteActor.hashCode());
   
    // create a local actor and pass the reference of the remote actor
    actor = system.actorOf(new Props(new UntypedActorFactory() {
      public UntypedActor create() {
        return new ClientActor(remoteActor);
      }
    }));
    // send a message to the local client actor
View Full Code Here

    // creating the ServerActor on the specified remote server
    final ActorRef serverActor = system.actorOf(new Props(ServerActor.class)
        .withDeploy(new Deploy(new RemoteScope(addr))));

    // create a local actor and pass the reference of the remote actor
    actor = system.actorOf(new Props(new UntypedActorFactory() {
      public UntypedActor create() {
        return new ClientActor(serverActor);
      }
    }));
    // send a message to the local client actor
View Full Code Here

    // creating the ServerActor on the specified remote server
    final ActorRef serverActor = system.actorOf(new Props(ServerActor.class)
        .withDeploy(new Deploy(new RemoteScope(addr))));

    // create a local actor and pass the reference of the remote actor
    actor = system.actorOf(new Props(new UntypedActorFactory() {
      public UntypedActor create() {
        return new ClientActor(serverActor);
      }
    }));
    // send a message to the local client actor
View Full Code Here

    // creating the ServerActor on the specified remote server
    final ActorRef serverActor = system.actorOf(new Props(ServerActor.class),"remoteServerActor");

    // create a local actor and pass the reference of the remote actor
    actor = system.actorOf(new Props(new UntypedActorFactory() {
      public UntypedActor create() {
        return new ClientActor(serverActor);
      }
    }));
    // send a message to the local client actor
View Full Code Here

    // create the aggregate Actor
    aggregateActor = system.actorOf(new Props(AggregateActor.class));

    // create the list of reduce Actors
    reduceRouter = system.actorOf(new Props(new UntypedActorFactory() {
      public UntypedActor create() {
        return new ReduceActor(aggregateActor);
      }
    }).withRouter(new RoundRobinRouter(no_of_reduce_workers)));

    // create the list of map Actors
    mapRouter = system.actorOf(new Props(new UntypedActorFactory() {
      public UntypedActor create() {
        return new MapActor(reduceRouter);
      }
    }).withRouter(new RoundRobinRouter(no_of_map_workers)));

    // create the overall WCMapReduce Actor that acts as the remote actor
    // for clients
    wcMapReduceActor = system.actorOf(new Props(new UntypedActorFactory() {
      public UntypedActor create() {
        return new WCMapReduceActor(aggregateActor, mapRouter);
      }
    }).withDispatcher("priorityMailBox-dispatcher"), "WCMapReduceActor");
View Full Code Here

    final ActorRef remoteActor = system
        .actorFor("akka://WCMapReduceApp@127.0.0.1:2552/user/WCMapReduceActor");

    @SuppressWarnings("serial")
    ActorRef actor = system.actorOf(new Props(new UntypedActorFactory() {
      public UntypedActor create() {
        return new ClientActor(remoteActor);
      }
    }));
View Full Code Here

    final int no_of_workers = 10;

    system = ActorSystem.create("LoadGeneratorApp");

    final ActorRef appManager = system.actorOf(
        new Props(new UntypedActorFactory() {
          public UntypedActor create() {
            return new JobControllerActor(no_of_msgs);
          }
        }), "jobController");

    router = system.actorOf(new Props(new UntypedActorFactory() {
      public UntypedActor create() {
        return new WorkerActor(appManager);
      }
    }).withRouter(new RoundRobinRouter(no_of_workers)));
  }
View Full Code Here

TOP

Related Classes of akka.actor.UntypedActorFactory

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.