/** * Unregisters a MultiUserChatService from the manager. It can be used * to explicitly unregister services, and is also used internally to unregister * database stored services. Triggers the service to shut down. * * @param subdomain The subdomain of the service to be unregistered. */ public void unregisterMultiUserChatService(String subdomain) { Log.debug("MultiUserChatManager: Unregistering MUC service "+subdomain); MultiUserChatService service = mucServices.get(subdomain); if (service != null) { service.shutdown(); try { ComponentManagerFactory.getComponentManager().removeComponent(subdomain); } catch (ComponentException e) { Log.error("MultiUserChatManager: Unable to remove "+subdomain+" from component manager.", e); } mucServices.remove(subdomain); } }
@Override public void destroy() { if (componentManager != null && component != null) { try { componentManager.removeComponent(component.getSubdomain()); } catch (ComponentException ce) { Log.warn( "An unexpected exception occurred while destroying the wrapper.", ce ); } componentManager = null; component = null; } pluginDirectory = null; }
/** * Unregisters a MultiUserChatService from the manager. It can be used * to explicitly unregister services, and is also used internally to unregister * database stored services. Triggers the service to shut down. * * @param subdomain The subdomain of the service to be unregistered. */ public void unregisterMultiUserChatService(String subdomain) { Log.debug("MultiUserChatManager: Unregistering MUC service "+subdomain); MultiUserChatService service = mucServices.get(subdomain); if (service != null) { service.shutdown(); try { ComponentManagerFactory.getComponentManager().removeComponent(subdomain); } catch (ComponentException e) { Log.error("MultiUserChatManager: Unable to remove "+subdomain+" from component manager.", e); } mucServices.remove(subdomain); } }
@Override public void destroy() { if ( initThread != null && initThread.isAlive() ) { initThread.interrupt(); initThread = null; } ((InternalComponentManager) ComponentManagerFactory.getComponentManager()).removeListener( this ); try { Log.debug( "Destroying Jitsi Focus Component..." ); if ( jicofoComponent == null) { Log.warn( "Unable to destroy the Jitsi Focus Component, as none appears to be running!" ); } else { ComponentManagerFactory.getComponentManager().removeComponent(jicofoSubdomain); jicofoSubdomain = null; jicofoComponent.dispose(); jicofoComponent = null; } Log.trace( "Successfully destroyed Jitsi Focus Component. " ); } catch ( Exception ex ) { Log.error( "An exception occurred while trying to destroy the Jitsi Jicofo wrapper.", ex ); } }
componentManager.removeComponent(component.getSubdomain());