01: /**
02: * $RCSfile$
03: * $Revision: 128 $
04: * $Date: 2004-10-25 20:42:00 -0300 (Mon, 25 Oct 2004) $
05: *
06: * Copyright (C) 2004 Jive Software. All rights reserved.
07: *
08: * This software is published under the terms of the GNU Public License (GPL),
09: * a copy of which is included in this distribution.
10: */package org.jivesoftware.openfire.disco;
11:
12: import java.util.Iterator;
13:
14: /**
15: * ServerItemsProvider are responsible for providing the items associated with the SERVER. Example
16: * of server items are: Public Chatrooms, PubSub service, etc.<p>
17: * <p/>
18: * When the server starts up, IQDiscoItemsHandler will request to all the services that implement
19: * the ServerItemsProvider interface for their DiscoServerItems. Each DiscoServerItem will provide
20: * its DiscoInfoProvider which will automatically be included in IQDiscoInfoHandler as the provider
21: * for this item's JID. Moreover, each DiscoServerItem will also provide its DiscoItemsProvider
22: * which will automatically be included in IQDiscoItemsHandler. Special attention must be paid to
23: * the JID since all the items with the same host will share the same DiscoInfoProvider or
24: * DiscoItemsProvider. Therefore, a service must implement this interface in order to get its
25: * services published as items associatd with the server.
26: *
27: * @author Gaston Dombiak
28: */
29: public interface ServerItemsProvider {
30:
31: /**
32: * Returns an Iterator (of DiscoServerItem) with the items associated with the server or null
33: * if none.
34: *
35: * @return an Iterator (of DiscoServerItem) with the items associated with the server or null
36: * if none.
37: */
38: public abstract Iterator<DiscoServerItem> getItems();
39: }
|