XMPPServer.java 3.67 KB
Newer Older
Matt Tucker's avatar
Matt Tucker committed
1
/**
Matt Tucker's avatar
Matt Tucker committed
2 3 4 5
 * $RCSfile$
 * $Revision$
 * $Date$
 *
Matt Tucker's avatar
Matt Tucker committed
6
 * Copyright (C) 2004 Jive Software. All rights reserved.
Matt Tucker's avatar
Matt Tucker committed
7
 *
Matt Tucker's avatar
Matt Tucker committed
8 9
 * This software is published under the terms of the GNU Public License (GPL),
 * a copy of which is included in this distribution.
Matt Tucker's avatar
Matt Tucker committed
10
 */
Matt Tucker's avatar
Matt Tucker committed
11

Matt Tucker's avatar
Matt Tucker committed
12 13
package org.jivesoftware.messenger;

14
import org.xmpp.packet.JID;
15 16 17 18 19 20 21 22 23 24 25
import org.jivesoftware.messenger.user.RosterManager;
import org.jivesoftware.messenger.user.UserManager;
import org.jivesoftware.messenger.handler.IQRegisterHandler;
import org.jivesoftware.messenger.handler.PresenceUpdateHandler;
import org.jivesoftware.messenger.handler.PresenceSubscribeHandler;
import org.jivesoftware.messenger.handler.IQHandler;
import org.jivesoftware.messenger.transport.TransportHandler;
import org.jivesoftware.messenger.audit.AuditManager;
import org.jivesoftware.messenger.disco.ServerFeaturesProvider;
import org.jivesoftware.messenger.disco.ServerItemsProvider;
import org.jivesoftware.messenger.disco.IQDiscoInfoHandler;
26
import org.jivesoftware.messenger.muc.MultiUserChatServer;
27 28

import java.util.List;
Matt Tucker's avatar
Matt Tucker committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

/**
 * The XMPP server definition. An interface allows us to implement the
 * server's backend by plugging in different classes for the various
 * data managers. The class is designed so that you can host multiple server
 * instances in the same JVM.
 * <p/>
 * The server instance is typically obtained by using the getServer() method
 * on the Session object. This gives you the server within the proper security and
 * resource/QoS context of the session. Obtaining a server reference from any
 * other source is typically only needed by internal server components.
 * </p>
 *
 * @author Iain Shigeoka
 */
44
public interface XMPPServer {
Matt Tucker's avatar
Matt Tucker committed
45 46 47 48 49 50 51 52 53 54 55 56 57

    /**
     * Obtain a snapshot of the server's status.
     *
     * @return the server information current at the time of the method call.
     */
    public XMPPServerInfo getServerInfo();

    /**
     * Determines if the given address is local to the server (managed by this server domain).
     *
     * @return true if the address is a local address to this server.
     */
58
    public boolean isLocal(JID jid);
Matt Tucker's avatar
Matt Tucker committed
59 60 61 62 63 64 65 66

    /**
     * Creates an XMPPAddress local to this server.
     *
     * @param username the user name portion of the id or null to indicate none is needed.
     * @param resource the resource portion of the id or null to indicate none is needed.
     * @return an XMPPAddress for the server.
     */
67
    public JID createJID(String username, String resource);
Matt Tucker's avatar
Matt Tucker committed
68

69 70
    public boolean isSetupMode();
    
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
    public ConnectionManager getConnectionManager();

    public RoutingTable getRoutingTable();

    public PacketDeliverer getPacketDeliverer();

    public RosterManager getRosterManager();

    public PresenceManager getPresenceManager();

    public OfflineMessageStore getOfflineMessageStore();

    public OfflineMessageStrategy getOfflineMessageStrategy();

    public PacketRouter getPacketRouter();

    public IQRegisterHandler getIQRegisterHandler();

    public List<IQHandler> getIQHandlers();

    public SessionManager getSessionManager();

    public TransportHandler getTransportHandler();

    public PresenceUpdateHandler getPresenceUpdateHandler();

    public PresenceSubscribeHandler getPresenceSubscribeHandler();

    public IQRouter getIQRouter();

    public MessageRouter getMessageRouter();

    public PresenceRouter getPresenceRouter();

    public UserManager getUserManager();

    public AuditManager getAuditManager();

    public List<ServerFeaturesProvider> getServerFeaturesProviders();

    public List<ServerItemsProvider> getServerItemsProviders();

    public IQDiscoInfoHandler getIQDiscoInfoHandler();

    public PrivateStorage getPrivateStorage();
116 117

    public MultiUserChatServer getMultiUserChatServer();
Matt Tucker's avatar
Matt Tucker committed
118
}