24252627282930313233
for (int i = 0; i < 25; i++) { actor.tell(i); } _system.shutdown(); } }
232425262728293031
2425262728293031
2627282930313233
table.hit("DONE"); // cause the players to quit their threads. try { Thread.sleep(500); } catch (InterruptedException e) { } _system.shutdown(); } }
2324252627282930
for (int i = 1; i <= 10; i++) { // sends randomly to actors randomRouter.tell(i); } _system.shutdown(); } }
646566676869707172
log.info("Sending value \"String\", IllegalArgumentException should be thrown! Our Supervisor strategy says Stop !"); supervisor.tell(String.valueOf("Do Something")); log.info("Worker Actor shutdown !"); system.shutdown(); } }
293031323334353637
43444546474849505152
// Get access to the ActorRef ActorRef calActor = TypedActor.get(_system).getActorRefFor(calculator); // call actor with a message calActor.tell("Hi there"); _system.shutdown(); } }