class XMPPServerInfoImpl implements XMPPServerInfo {

    private static final Logger Log = LoggerFactory.getLogger( XMPPServerInfoImpl.class );

    private final Date startDate;

    public static final Version VERSION = new Version(4, 9, 0, Version.ReleaseStatus.Alpha, -1 );

    /**
     * Simple constructor
     *
     * @param startDate the server's last start time (can be null indicating
     *      it hasn't been started).
     */
    public XMPPServerInfoImpl(Date startDate) {
        this.startDate = startDate;
    }

    @Override
    public Version getVersion() {
        return VERSION;
    }

    @Override
    public String getHostname()
    {<FILL_FUNCTION_BODY>}

    @Override
    public void setHostname( String fqdn )
    {
        if ( fqdn == null || fqdn.isEmpty() )
        {
            JiveGlobals.deleteXMLProperty( "fqdn" );
        }
        else
        {
            JiveGlobals.setXMLProperty( "fqdn", fqdn.toLowerCase() );
        }
    }

    @Override
    public String getXMPPDomain()
    {
        return Optional.ofNullable(XMPP_DOMAIN.getValue()).orElse(getHostname()).toLowerCase();
    }

    @Override
    public Date getLastStarted() {
        return startDate;
    }
}

        final String fqdn = JiveGlobals.getXMLProperty( "fqdn" );
        if ( fqdn != null && !fqdn.trim().isEmpty() )
        {
            return fqdn.trim().toLowerCase();
        }

        try
        {
            return InetAddress.getLocalHost().getCanonicalHostName().toLowerCase();
        }
        catch (UnknownHostException ex)
        {
            Log.warn( "Unable to determine local hostname.", ex );
            return "localhost";
        }
    
<no_super_class>