KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > messenger > disco > ServerItemsProvider


1 /**
2  * $RCSfile: ServerItemsProvider.java,v $
3  * $Revision: 1.2 $
4  * $Date: 2004/10/25 23:41:58 $
5  *
6  * Copyright (C) 2004 Jive Software. All rights reserved.
7  *
8  * This software is published under the terms of the GNU Public License (GPL),
9  * a copy of which is included in this distribution.
10  */

11
12 package org.jivesoftware.messenger.disco;
13
14 import java.util.Iterator JavaDoc;
15
16 /**
17  * ServerItemsProvider are responsible for providing the items associated with the SERVER. Example
18  * of server items are: Public Chatrooms, PubSub service, etc.<p>
19  * <p/>
20  * When the server starts up, IQDiscoItemsHandler will request to all the services that implement
21  * the ServerItemsProvider interface for their DiscoServerItems. Each DiscoServerItem will provide
22  * its DiscoInfoProvider which will automatically be included in IQDiscoInfoHandler as the provider
23  * for this item's JID. Moreover, each DiscoServerItem will also provide its DiscoItemsProvider
24  * which will automatically be included in IQDiscoItemsHandler. Special attention must be paid to
25  * the JID since all the items with the same host will share the same DiscoInfoProvider or
26  * DiscoItemsProvider. Therefore, a service must implement this interface in order to get its
27  * services published as items associatd with the server.
28  *
29  * @author Gaston Dombiak
30  */

31 public interface ServerItemsProvider {
32
33     /**
34      * Returns an Iterator (of DiscoServerItem) with the items associated with the server or null
35      * if none.
36      *
37      * @return an Iterator (of DiscoServerItem) with the items associated with the server or null
38      * if none.
39      */

40     public abstract Iterator JavaDoc getItems();
41 }
42
Popular Tags