public synchronized void pauseAutoRestartEnabled(final Duration pause) {
        setAutoRestartEnabled(false);

        if (reenableTask != null) {
            TaskEngine.getInstance().cancelScheduledTask(reenableTask);
        }
        reenableTask = new TimerTask() {
            @Override
            public void run() {
                 setAutoRestartEnabled(true);
            }
        };

        TaskEngine.getInstance().schedule(reenableTask, pause);
    }
Temporarily disables auto-restarting of the plugin's webserver when certificate changes are detected.

@param pause The duration for which certificate changes are ignored.
xmppserver/src/main/java/org/jivesoftware/openfire/container/AdminConsolePlugin.java