protected void setupDefaultResponseCodeHandler(){ if(this.defaultHandler != null){ this.registerHandler("/", this.defaultHandler); } }
@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)); } }
void registerLocation(LocationService location) { locations.put(location.getLocationPath(), location); registerHandler(location.getLocationPath(), location.getLocationHandler()); undertowService.getValue().fireEvent(listener -> listener.onDeploymentStart(location.getLocationPath(), Host.this)); }
public void registerDeployment(final Deployment deployment, HttpHandler handler) { DeploymentInfo deploymentInfo = deployment.getDeploymentInfo(); String path = getDeployedContextPath(deploymentInfo); registerHandler(path, handler); deployments.add(deployment); UndertowLogger.ROOT_LOGGER.registerWebapp(path, getServer().getName()); undertowService.getValue().fireEvent(listener -> listener.onDeploymentStart(deployment, Host.this)); }
@Override public void start(StartContext startContext) throws StartException { HttpHandler handler = remoteHttpInvokerServiceInjectedValue.getValue(); if(httpAuthenticationFactoryInjectedValue.getOptionalValue() != null) { handler = secureAccess(handler, httpAuthenticationFactoryInjectedValue.getOptionalValue()); } else if(realmService.getOptionalValue() != null) { handler = secureAccess(handler, realmService.getOptionalValue().getHttpAuthenticationFactory()); } handler = setupRoutes(handler); host.getValue().registerHandler(path, handler); host.getValue().registerLocation(path); }
protected void setupDefaultResponseCodeHandler(){ if(this.defaultHandler != null){ this.registerHandler("/", this.defaultHandler); } }
protected void setupDefaultResponseCodeHandler(){ if(this.defaultHandler != null){ this.registerHandler("/", this.defaultHandler); } }
@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)); } }
@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)); } }
void registerLocation(LocationService location) { locations.put(location.getLocationPath(), location); registerHandler(location.getLocationPath(), location.getLocationHandler()); undertowService.getValue().fireEvent(listener -> listener.onDeploymentStart(location.getLocationPath(), Host.this)); }
void registerLocation(LocationService location) { locations.put(location.getLocationPath(), location); registerHandler(location.getLocationPath(), location.getLocationHandler()); undertowService.getValue().fireEvent(listener -> listener.onDeploymentStart(location.getLocationPath(), Host.this)); }
public void registerDeployment(final Deployment deployment, HttpHandler handler) { DeploymentInfo deploymentInfo = deployment.getDeploymentInfo(); String path = getDeployedContextPath(deploymentInfo); registerHandler(path, handler); deployments.add(deployment); UndertowLogger.ROOT_LOGGER.registerWebapp(path, getServer().getName()); undertowService.getValue().fireEvent(listener -> listener.onDeploymentStart(deployment, Host.this)); }
public void registerDeployment(final Deployment deployment, HttpHandler handler) { DeploymentInfo deploymentInfo = deployment.getDeploymentInfo(); String path = getDeployedContextPath(deploymentInfo); registerHandler(path, handler); deployments.add(deployment); UndertowLogger.ROOT_LOGGER.registerWebapp(path, getServer().getName()); undertowService.getValue().fireEvent(listener -> listener.onDeploymentStart(deployment, Host.this)); }
@Override public void start(StartContext startContext) throws StartException { HttpHandler handler = remoteHttpInvokerServiceInjectedValue.getValue(); if(httpAuthenticationFactoryInjectedValue.getOptionalValue() != null) { handler = secureAccess(handler, httpAuthenticationFactoryInjectedValue.getOptionalValue()); } else if(realmService.getOptionalValue() != null) { handler = secureAccess(handler, realmService.getOptionalValue().getHttpAuthenticationFactory()); } handler = setupRoutes(handler); host.getValue().registerHandler(path, handler); host.getValue().registerLocation(path); }
@Override public void start(StartContext startContext) throws StartException { HttpHandler handler = remoteHttpInvokerServiceInjectedValue.getValue(); if(httpAuthenticationFactoryInjectedValue.getOptionalValue() != null) { handler = secureAccess(handler, httpAuthenticationFactoryInjectedValue.getOptionalValue()); } else if(realmService.getOptionalValue() != null) { handler = secureAccess(handler, realmService.getOptionalValue().getHttpAuthenticationFactory()); } handler = setupRoutes(handler); host.getValue().registerHandler(path, handler); host.getValue().registerLocation(path); }