final HttpManagement httpManagement = httpManagementInjector.getOptionalValue();
if (httpManagement != null) {
if (httpManagement.hasConsole()) {
host.registerHandler(CONSOLE_PATH, new ConsoleRedirectHandler(httpManagement));
} else {
host.registerHandler(CONSOLE_PATH, new RedirectHandler(NO_CONSOLE));
}
} else {
host.registerHandler(CONSOLE_PATH, new RedirectHandler(NO_CONSOLE));
}
}