+ String s = br.readLine();
+ String[] split = s.split(" ");
+ if(split.length > 1) {
+ String command = split[0];
+ String actor = split[1];
+
+ if ("k".equals(command)) {
+ int i = Integer.parseInt(actor);
+ examples.get(i - 1)
+ .tell(PoisonPill.getInstance(), null);
+ continue;
+ } else if ("s".equals(command)) {
+ int i = Integer.parseInt(actor);
+ String actorName = "example-" + i;
+ examples.add(i - 1,
+ actorSystem.actorOf(ExampleActor.props(actorName,
+ withoutPeer(actorName), Optional.<ConfigParams>absent()),
+ actorName));
+ System.out.println("Created actor : " + actorName);
+ continue;
+ }
+ }
+
+ int i = Integer.parseInt(s);