@Override public void init() throws ServletException { super.init(); Logger logger = getLogger(); logger.addHandler(LoggingHandler.getInstance()); DriverSessions driverSessions = sessionsSupplier.get(); commandHandler = new JsonHttpCommandHandler(driverSessions, logger); long sessionTimeOutInMs = getValueToUseInMs("webdriver.server.session.timeout", 1800); long browserTimeoutInMs = getValueToUseInMs("webdriver.server.browser.timeout", 0); if (sessionTimeOutInMs > 0 || browserTimeoutInMs > 0) { createSessionCleaner(logger, driverSessions, sessionTimeOutInMs, browserTimeoutInMs); } }
@Override public void destroy() { getLogger().removeHandler(LoggingHandler.getInstance()); if (sessionCleaner != null) { sessionCleaner.stopCleaner(); } }