@Override
  public void postStop() throws Exception {
    super.postStop();

    log.info("Post stop on model saver");
    cluster.unsubscribe(getSelf());
  }
 @Override
 public void unhandled(Object message) {
   if (message instanceof Terminated && ((Terminated) message).getActor().equals(workExecutor)) {
     getContext().stop(getSelf());
   } else if (message instanceof WorkIsReady) {
     // do nothing
   } else {
     super.unhandled(message);
   }
 }
Example #3
0
 @Override
 public void postStop() {
   if (logger.isInfoEnabled()) {
     logger.info("UssdInterpreter postStop");
   }
   if (ussdCall != null) getContext().stop(ussdCall);
   if (outboundCall != null) getContext().stop(outboundCall);
   if (downloader != null) getContext().stop(downloader);
   if (parser != null) getContext().stop(parser);
   if (mailerNotify != null) getContext().stop(mailerNotify);
   super.postStop();
 }
 @Override
 public void preStart() {
   System.out.println(Thread.currentThread().getId() + " Prestart...!!");
   super.preStart();
 }
Example #5
0
 @Override
 public void aroundPostStop() {
   super.aroundPostStop();
   LOG.info("Stopping...");
 }
Example #6
0
 @Override
 public void preStart() throws Exception {
   super.preStart();
   ActorRef greeter = getContext().actorOf(Props.create(Greeter.class), "greeter");
   greeter.tell(MSG.GREET, getSelf());
 }
 @Override
 public void preStart() {
   super.preStart();
   System.out.println("DummyActor started");
 }
 @Override
 public void preStart() throws Exception {
   super.preStart();
   log.info("Pre start on model saver");
 }