use of org.jboss.as.server.mgmt.domain.HttpManagement in project wildfly by wildfly.
the class ConsoleRedirectService method start.
@Override
public void start(final StartContext startContext) throws StartException {
final Host host = hostInjector.getValue();
UndertowLogger.ROOT_LOGGER.debugf("Starting console redirect for %s", host.getName());
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));
}
}
Aggregations