// Proably need to wait for core to be running to make sure dht plugin is fully avail
AzureusCoreFactory.addCoreRunningListener(new AzureusCoreRunningListener() {
public void azureusCoreRunning(AzureusCore core) {
PluginManager pm = core.getPluginManager();
connection_manager = PluginInitializer.getDefaultInterface().getConnectionManager();
PluginInterface dht_pi = pm.getPluginInterfaceByClass(DHTPlugin.class);
if (dht_pi != null) {
dhtPlugin = (DHTPlugin) dht_pi.getPlugin();
}
}
});
}