KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > messenger > XMPPServerInfo


1 /**
2  * $RCSfile: XMPPServerInfo.java,v $
3  * $Revision: 1.2 $
4  * $Date: 2004/10/25 23:41:56 $
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;
13
14 import org.jivesoftware.util.Version;
15 import java.util.Date JavaDoc;
16 import java.util.Iterator JavaDoc;
17
18 /**
19  * Information 'snapshot' of a server's state. Useful for statistics
20  * gathering and administration display.
21  *
22  * @author Iain Shigeoka
23  */

24 public interface XMPPServerInfo {
25
26     /**
27      * Obtain the server's version information. Typically used for iq:version
28      * and logging information.
29      *
30      * @return the version of the server.
31      */

32     public Version getVersion();
33
34     /**
35      * Obtain the server name (ip address or hostname).
36      *
37      * @return the server's name as an ip address or host name.
38      */

39     public String JavaDoc getName();
40
41     /**
42      * Set the server name (ip address or hostname). The server
43      * must be restarted for this change to take effect.
44      *
45      * @param serverName the server's name as an ip address or host name.
46      */

47     public void setName(String JavaDoc serverName);
48
49     /**
50      * Obtain the date when the server was last started.
51      *
52      * @return the date the server was started or null if server has not been started.
53      */

54     public Date JavaDoc getLastStarted();
55
56     /**
57      * Obtain the date when the server was last stopped.
58      *
59      * @return the date the server was stopped or null if server has not been
60      * started or is still running
61      */

62     public Date JavaDoc getLastStopped();
63
64     /**
65      * Obtain the server ports active on this server.
66      *
67      * @return an iterator over the server ports for this server.
68      */

69     public Iterator JavaDoc getServerPorts();
70 }
Popular Tags