Search in sources :

Example 1 with Component

use of org.xmpp.component.Component in project Openfire by igniterealtime.

the class InternalComponentManager method removeComponent.

/**
     * 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.
     */
@Override
public void removeComponent(String subdomain) {
    RoutableComponents components = null;
    if (routables == null || (components = routables.get(subdomain)) == null) {
        return;
    }
    List<Component> componentsToRemove = new ArrayList<>(components.getComponents());
    for (Component component : componentsToRemove) {
        removeComponent(subdomain, component);
    }
}
Also used : ArrayList(java.util.ArrayList) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) Component(org.xmpp.component.Component)

Aggregations

ArrayList (java.util.ArrayList)1 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)1 Component (org.xmpp.component.Component)1