- @Override public void onReceive(Object message) throws Exception {
- if(message instanceof Terminated){
- Terminated terminated = (Terminated) message;
- if(LOG.isDebugEnabled()) {
- LOG.debug("Actor terminated : {}", terminated.actor());
- }
- }else if(message instanceof Monitor){
- Monitor monitor = (Monitor) message;
- getContext().watch(monitor.getActorRef());
+ @Override
+ public void onReceive(final Object message) {
+ if (message instanceof Terminated terminated) {
+ LOG.debug("Actor terminated : {}", terminated.actor());
+ } else if (message instanceof Monitor monitor) {
+ getContext().watch(monitor.getActorRef());