/** Invoke {@link ShutdownHook}s. */ protected void initComplete() { for (StartupHook h : startUpHook) { try { h.started(framework); } catch (Exception ex) { logger.warn("", ex); } } }
/** * Add a {@link StartupHook}. If the {@link AtmosphereFramework#isInit} return true, the * StartupHook will be executed immediately. * * @param s a {@link StartupHook} * @return this */ public AtmosphereConfig startupHook(StartupHook s) { if (framework().isInit) { s.started(framework); } else { startUpHook.add(s); } return this; }