if (sImapServer != null) sImapServer.shutdown(10); sImapServer = null;
if (sImapServer != null) { if (sImapServer instanceof ImapServer) { ((ImapServer)sImapServer).shutdown(10); } else if (sImapServer instanceof OzServer) { ((OzServer)sImapServer).shutdown(); } sImapServer = null; }
    public synchronized static void shutdownImapServers() {        if (sImapServer != null)            sImapServer.shutdown(10); // TODO shutdown grace period from config        sImapServer = null;        if (sImapSSLServer != null)            sImapSSLServer.shutdown(10); // TODO shutdown grace period from config        sImapSSLServer = null;    }