XMPPServerInfo.java 3 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 9 10 11 12 13 14 15 16 17 18
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
19 20
 */

21
package org.jivesoftware.openfire;
22 23

import org.jivesoftware.util.Version;
24 25

import java.util.Collection;
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
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();

    /**
45
     * Obtain the server name (IP address or hostname).
46
     *
47
     * @return the server's name as an IP address or host name.
Gaston Dombiak's avatar
Gaston Dombiak committed
48
     * @deprecated replaced by {@link #getXMPPDomain()}
49
     */
50
    @Deprecated
51 52 53
    public String getName();

    /**
54
     * Set the server name (IP address or hostname). The server
55 56
     * must be restarted for this change to take effect.
     *
57
     * @param serverName the server's name as an IP address or host name.
Gaston Dombiak's avatar
Gaston Dombiak committed
58
     * @deprecated replaced by {@link #setXMPPDomain(String)}
59
     */
60
    @Deprecated
61 62
    public void setName(String serverName);

63 64 65 66 67 68 69 70 71 72 73 74 75
    /**
     * 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
76
    public String getXMPPDomain();
77 78 79 80 81 82 83 84

    /**
     * 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
85
    public void setXMPPDomain(String domainName);
86

87 88 89 90 91 92 93 94 95 96 97 98
    /**
     * 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.
     */
99
    public Collection<ServerPort> getServerPorts();
100
}