* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.remote.rpc;
import akka.actor.Terminated;
LOG.debug("Created TerminationMonitor");
}
- @Override public void onReceive(Object message) {
- if (message instanceof Terminated) {
- Terminated terminated = (Terminated) message;
+ @Override
+ public void onReceive(final Object message) {
+ if (message instanceof Terminated terminated) {
LOG.debug("Actor terminated : {}", terminated.actor());
- } else if (message instanceof Monitor) {
- Monitor monitor = (Monitor) message;
+ } else if (message instanceof Monitor monitor) {
getContext().watch(monitor.getActorRef());
}
}