protected void onNetworkTypeChange(NetworkInfo oldNetwork,NetworkInfo newNetwork) throws RouterException {
  log.info(String.format("Network type changed %s => %s",oldNetwork == null ? "" : oldNetwork.getTypeName(),newNetwork == null ? "NONE" : newNetwork.getTypeName()));
  if (disable()) {
    log.info(String.format("Disabled router on network type change (old network: %s)",oldNetwork == null ? "NONE" : oldNetwork.getTypeName()));
  }
  networkInfo=newNetwork;
  if (enable()) {
    log.info(String.format("Enabled router on network type change (new network: %s)",newNetwork == null ? "NONE" : newNetwork.getTypeName()));
  }
}

protected void onNetworkTypeChange ( NetworkInfo oldNetwork , NetworkInfo newNetwork ) throws RouterException { log . info ( String . format ( "Network type changed %s => %s" , oldNetwork == null ? "" : oldNetwork . getTypeName ( ) , newNetwork == null ? "NONE" : newNetwork . getTypeName ( ) ) ) ; if ( disable ( ) ) { log . info ( String . format ( "Disabled router on network type change (old network: %s)" , oldNetwork == null ? "NONE" : oldNetwork . getTypeName ( ) ) ) ; } networkInfo = newNetwork ; if ( enable ( ) ) { log . info ( String . format ( "Enabled router on network type change (new network: %s)" , newNetwork == null ? "NONE" : newNetwork . getTypeName ( ) ) ) ; } }
can be overriden by subclasses to do additional work .
