XMPPServerInfo.java 2.63 KB
Newer Older
1 2 3 4 5
/**
 * $RCSfile$
 * $Revision: 128 $
 * $Date: 2004-10-25 20:42:00 -0300 (Mon, 25 Oct 2004) $
 *
6
 * Copyright (C) 2004-2008 Jive Software. All rights reserved.
7 8
 *
 * This software is published under the terms of the GNU Public License (GPL),
9 10
 * a copy of which is included in this distribution, or a commercial license
 * agreement with Jive.
11 12
 */

13
package org.jivesoftware.openfire;
14 15

import org.jivesoftware.util.Version;
16 17

import java.util.Collection;
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
import java.util.Date;

/**
 * Information 'snapshot' of a server's state. Useful for statistics
 * gathering and administration display.
 *
 * @author Iain Shigeoka
 */
public interface XMPPServerInfo {

    /**
     * Obtain the server's version information. Typically used for iq:version
     * and logging information.
     *
     * @return the version of the server.
     */
    public Version getVersion();

    /**
37
     * Obtain the server name (IP address or hostname).
38
     *
39
     * @return the server's name as an IP address or host name.
Gaston Dombiak's avatar
Gaston Dombiak committed
40
     * @deprecated replaced by {@link #getXMPPDomain()}
41
     */
42
    @Deprecated
43 44 45
    public String getName();

    /**
46
     * Set the server name (IP address or hostname). The server
47 48
     * must be restarted for this change to take effect.
     *
49
     * @param serverName the server's name as an IP address or host name.
Gaston Dombiak's avatar
Gaston Dombiak committed
50
     * @deprecated replaced by {@link #setXMPPDomain(String)}
51
     */
52
    @Deprecated
53 54
    public void setName(String serverName);

55 56 57 58 59 60 61 62 63 64 65 66 67
    /**
     * Obtain the host name (IP address or hostname) of this server node.
     *
     * @return the server's host name as an IP address or host name.
     */
    public String getHostname();

    /**
     * Obtain the server XMPP domain name. Note that, if unconfigured, the
     * returned value will equal the hostname or IP address of the server.
     *
     * @return the name of the XMPP domain that this server is part of.
     */
Gaston Dombiak's avatar
Gaston Dombiak committed
68
    public String getXMPPDomain();
69 70 71 72 73 74 75 76

    /**
     * Set the server XMPP domain name. The server must be
     * restarted for this change to take effect.
     *
     * @param domainName
     *             the XMPP domain that this server is part of.
     */
Gaston Dombiak's avatar
Gaston Dombiak committed
77
    public void setXMPPDomain(String domainName);
78

79 80 81 82 83 84 85 86 87 88 89 90
    /**
     * Obtain the date when the server was last started.
     *
     * @return the date the server was started or null if server has not been started.
     */
    public Date getLastStarted();

    /**
     * Obtain the server ports active on this server.
     *
     * @return an iterator over the server ports for this server.
     */
91
    public Collection<ServerPort> getServerPorts();
92
}