public void registerNetworkForCleanup(String networkName){
  registeredNetworks.add(networkName);
}

public void registerNetworkForCleanup ( String networkName ) { registeredNetworks . add ( networkName ) ; }
register a network to be cleaned up at jvm shutdown .
