@Override
    public void removeComponent(String subdomain) {
        RoutableComponents components;
        if ((components = routables.get(subdomain)) == null) {
            return;
        }
        List<Component> componentsToRemove = new ArrayList<>(components.getComponents());
        for (Component component : componentsToRemove) {
            removeComponent(subdomain, component);
        }
    }
Removes a component. The {@link Component#shutdown} method will be called on the
component. Note that if the component was an external component that was connected
several times then all its connections will be terminated.

@param subdomain the subdomain of the component's address.
xmppserver/src/main/java/org/jivesoftware/openfire/component/InternalComponentManager.java