Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.spi
Class XMPPServerInfoImpl

java.lang.Object
  extended by org.jivesoftware.wildfire.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

Constructor Summary
XMPPServerInfoImpl(String serverName, Version version, Date startDate, Date stopDate, ConnectionManager connectionManager)
          Simple constructor
 
Method Summary
 Date getLastStarted()
          Obtain the date when the server was last started.
 Date getLastStopped()
          Obtain the date when the server was last stopped.
 String getName()
          Obtain the server name (ip address or hostname).
 Collection<ServerPort> getServerPorts()
          Obtain the server ports active on this server.
 Version getVersion()
          Obtain the server's version information.
 void setName(String serverName)
          Set the server name (ip address or hostname).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMPPServerInfoImpl

public XMPPServerInfoImpl(String serverName,
                          Version version,
                          Date startDate,
                          Date stopDate,
                          ConnectionManager connectionManager)
Simple constructor

Parameters:
serverName - the server's serverName (e.g. example.org).
version - the server's version number.
startDate - the server's last start time (can be null indicating it hasn't been started).
stopDate - the server's last stop time (can be null indicating it is running or hasn't been started).
connectionManager - the object that keeps track of the active ports.
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 interface XMPPServerInfo
Returns:
the version of the server.

getName

public String getName()
Description copied from interface: XMPPServerInfo
Obtain the server name (ip address or hostname).

Specified by:
getName in interface XMPPServerInfo
Returns:
the server's name as an ip address or host name.

setName

public void setName(String serverName)
Description copied from interface: XMPPServerInfo
Set the server name (ip address or hostname). The server must be restarted for this change to take effect.

Specified by:
setName in interface XMPPServerInfo
Parameters:
serverName - the server's name as an ip address or host name.

getLastStarted

public Date getLastStarted()
Description copied from interface: XMPPServerInfo
Obtain the date when the server was last started.

Specified by:
getLastStarted in interface XMPPServerInfo
Returns:
the date the server was started or null if server has not been started.

getLastStopped

public Date getLastStopped()
Description copied from interface: XMPPServerInfo
Obtain the date when the server was last stopped.

Specified by:
getLastStopped in interface XMPPServerInfo
Returns:
the date the server was stopped or null if server has not been started or is still running

getServerPorts

public Collection<ServerPort> getServerPorts()
Description copied from interface: XMPPServerInfo
Obtain the server ports active on this server.

Specified by:
getServerPorts in interface XMPPServerInfo
Returns:
an iterator over the server ports for this server.

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.