Package org.jivesoftware.openfire.spi
Class XMPPServerInfoImpl
- java.lang.Object
-
- org.jivesoftware.openfire.spi.XMPPServerInfoImpl
-
- All Implemented Interfaces:
XMPPServerInfo
public class XMPPServerInfoImpl extends Object implements XMPPServerInfo
Implements the server info for a basic server. Optimization opportunities in reusing this object the data is relatively static.- Author:
- Iain Shigeoka
-
-
Field Summary
Fields Modifier and Type Field Description static Version
VERSION
-
Fields inherited from interface org.jivesoftware.openfire.XMPPServerInfo
XMPP_DOMAIN
-
-
Constructor Summary
Constructors Constructor Description XMPPServerInfoImpl(Date startDate)
Simple constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getHostname()
Obtain the fully qualified domain name (hostname or IP address) of this server node.Date
getLastStarted()
Obtain the date when the server was last started.Version
getVersion()
Obtain the server's version information.String
getXMPPDomain()
Obtain the server XMPP domain name, which is equal for all server nodes in an Openfire cluster.void
setHostname(String fqdn)
Sets the fully qualified domain name of this server node.
-
-
-
Field Detail
-
VERSION
public static final Version VERSION
-
-
Constructor Detail
-
XMPPServerInfoImpl
public XMPPServerInfoImpl(Date startDate)
Simple constructor- Parameters:
startDate
- the server's last start time (can be null indicating it hasn't been started).
-
-
Method Detail
-
getVersion
public Version getVersion()
Description copied from interface:XMPPServerInfo
Obtain the server's version information. Typically used for iq:version and logging information.- Specified by:
getVersion
in interfaceXMPPServerInfo
- Returns:
- the version of the server.
-
getHostname
public String getHostname()
Description copied from interface:XMPPServerInfo
Obtain the fully qualified domain name (hostname or IP address) of this server node.- Specified by:
getHostname
in interfaceXMPPServerInfo
- Returns:
- the server's host name.
-
setHostname
public void setHostname(String fqdn)
Description copied from interface:XMPPServerInfo
Sets the fully qualified domain name of this server node. Preferrably, this is a network name, but can be an IP address. Note that some SASL implementations depend on the client sending the same FQDN value as the one that is configured in the server. When setting a new host name, the server note must be restarted.- Specified by:
setHostname
in interfaceXMPPServerInfo
- Parameters:
fqdn
- The hostname. When null or empty, a system default will be used instead.
-
getXMPPDomain
public String getXMPPDomain()
Description copied from interface:XMPPServerInfo
Obtain the server XMPP domain name, which is equal for all server nodes in an Openfire cluster.- Specified by:
getXMPPDomain
in interfaceXMPPServerInfo
- Returns:
- the name of the XMPP domain that this server is part of.
-
getLastStarted
public Date getLastStarted()
Description copied from interface:XMPPServerInfo
Obtain the date when the server was last started.- Specified by:
getLastStarted
in interfaceXMPPServerInfo
- Returns:
- the date the server was started or null if server has not been started.
-
-