use of org.jivesoftware.openfire.disco.IQDiscoInfoHandler in project Openfire by igniterealtime.
the class AbstractXepSupport method stop.
public void stop() {
IQRouter iqRouter = server.getIQRouter();
IQDiscoInfoHandler iqDiscoInfoHandler = server.getIQDiscoInfoHandler();
for (IQHandler iqHandler : iqHandlers) {
element2Handlers.remove(iqHandler.getInfo().getName());
try {
iqHandler.stop();
iqHandler.destroy();
} catch (Exception e) {
Log.warn("Unable to stop and destroy " + iqHandler.getClass());
}
if (iqHandler instanceof ServerFeaturesProvider) {
for (Iterator<String> i = ((ServerFeaturesProvider) iqHandler).getFeatures(); i.hasNext(); ) {
if (iqDiscoInfoHandler != null) {
iqDiscoInfoHandler.removeServerFeature(i.next());
}
}
}
if (muc) {
MultiUserChatManager manager = server.getMultiUserChatManager();
for (MultiUserChatService mucService : manager.getMultiUserChatServices()) {
mucService.removeIQHandler(iqHandler);
mucService.removeExtraFeature(namespace);
}
}
}
if (iqRouter != null) {
iqRouter.removeHandler(iqDispatcher);
}
}
Aggregations