3940414243444546
public void onSuccess(Integer count) { System.out.println("Count is " + count); } }); system.shutdown(); } }
64656667686970717273
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(); } }
212223242526272829
Thread.sleep(5000); supervisor.tell(Integer.valueOf(10)); system.shutdown(); } }
121314151617181920
ProcessOrderActor.class)); processOrder.tell(Integer.valueOf(456)); Thread.sleep(5000); _system.shutdown(); } }
3637383940414243444546
fileReadActor.tell(fileName,actor); remoteActor.tell("DISPLAY_LIST"); system.shutdown(); } public void shutdown() { // TODO Auto-generated method stub
14151617181920212223
pingPongActor.tell(PingPongActor.PING, pingPongActor); Thread.sleep(2000); _system.shutdown(); } }
46474849505152535455
// Get access to the ActorRef ActorRef calActor = TypedActor.get(_system).getActorRefFor(calculator); // call actor with a message calActor.tell("Hi there"); _system.shutdown(); } }
1617181920212223
.load().getConfig("LocalSys")); ActorRef localActor = _system.actorOf(new Props(LocalActor.class)); localActor.tell("Hello"); Thread.sleep(5000); _system.shutdown(); } }
2122232425262728293031
.get(_system); System.out.println(mysqlSetting.DB_NAME); System.out.println(mysqlSetting.DB_URL); _system.shutdown(); } /** * @param args */
232425262728293031
for (int i = 0; i < 5; i++) { actor.tell(i); } _system.shutdown(); } }