public void addServerItemsProvider(ServerItemsProvider provider) {
        DiscoServerItem discoItem;
        Iterator<DiscoServerItem> items = provider.getItems();
        if (items == null) {
            // Do nothing
            return;
        }
        while (items.hasNext()) {
            discoItem = items.next();
            // Add the element to the list of items related to the server
            addComponentItem(discoItem.getJID().toString(), discoItem.getNode(), discoItem.getName());

            // Add the new item as a valid entity that could receive info and items disco requests
            String host = discoItem.getJID().getDomain();
            infoHandler.setProvider(host, discoItem.getDiscoInfoProvider());
            setProvider(host, discoItem.getDiscoItemsProvider());
        }
    }
Adds the items provided by the new service that implements the ServerItemsProvider
interface. This information will be used whenever a disco for items is made against
the server (i.e. the packet's target is the server).
Example of item is: &lt;item jid='conference.localhost' name='Public chatrooms'/&gt;

@param provider the ServerItemsProvider that provides new server items.
xmppserver/src/main/java/org/jivesoftware/openfire/disco/IQDiscoItemsHandler.java