001/** 002 * 003 * Copyright 2003-2007 Jive Software. 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018package org.jivesoftware.smackx.disco; 019 020import java.util.List; 021 022import org.jivesoftware.smack.packet.ExtensionElement; 023 024import org.jivesoftware.smackx.disco.packet.DiscoverInfo; 025import org.jivesoftware.smackx.disco.packet.DiscoverItems; 026 027 028/** 029 * The NodeInformationProvider is responsible for providing supported identities, features 030 * and hosted items (i.e. DiscoverItems.Item) about a given node. This information will be 031 * requested each time this XMPP client receives a disco info or items requests on the 032 * given node. 033 * 034 * @author Gaston Dombiak 035 */ 036public interface NodeInformationProvider { 037 038 /** 039 * Returns a list of the Items {@link org.jivesoftware.smackx.disco.packet.DiscoverItems.Item} 040 * defined in the node. For example, the MUC protocol specifies that an XMPP client should 041 * answer an Item for each joined room when asked for the rooms where the use has joined. 042 * 043 * @return a list of the Items defined in the node. 044 */ 045 List<DiscoverItems.Item> getNodeItems(); 046 047 /** 048 * Returns a list of the features defined in the node. For 049 * example, the entity caps protocol specifies that an XMPP client 050 * should answer with each feature supported by the client version 051 * or extension. 052 * 053 * @return a list of the feature strings defined in the node. 054 */ 055 List<String> getNodeFeatures(); 056 057 /** 058 * Returns a list of the identities defined in the node. For 059 * example, the x-command protocol must provide an identity of 060 * category automation and type command-node for each command. 061 * 062 * @return a list of the Identities defined in the node. 063 */ 064 List<DiscoverInfo.Identity> getNodeIdentities(); 065 066 /** 067 * Returns a list of the stanza extensions defined in the node. 068 * 069 * @return a list of the stanza extensions defined in the node. 070 */ 071 List<? extends ExtensionElement> getNodePacketExtensions(); 072}