use of cn.taketoday.framework.web.reactive.server.ReactiveWebServerFactory in project today-infrastructure by TAKETODAY.
the class ReactiveWebServerApplicationContext method createWebServer.
private void createWebServer() {
WebServerManager serverManager = this.serverManager;
if (serverManager == null) {
String webServerFactoryBeanName = getWebServerFactoryBeanName();
ReactiveWebServerFactory webServerFactory = getWebServerFactory(webServerFactoryBeanName);
StandardBeanFactory beanFactory = getBeanFactory();
boolean lazyInit = beanFactory.getBeanDefinition(webServerFactoryBeanName).isLazyInit();
this.serverManager = new WebServerManager(this, webServerFactory, this::getHttpHandler, lazyInit);
beanFactory.registerSingleton("webServerGracefulShutdown", new WebServerGracefulShutdownLifecycle(this.serverManager.getWebServer()));
beanFactory.registerSingleton("webServerStartStop", new WebServerStartStopLifecycle(this.serverManager));
}
initPropertySources();
}
use of cn.taketoday.framework.web.reactive.server.ReactiveWebServerFactory in project today-framework by TAKETODAY.
the class ReactiveWebServerApplicationContext method createWebServer.
private void createWebServer() {
WebServerManager serverManager = this.serverManager;
if (serverManager == null) {
String webServerFactoryBeanName = getWebServerFactoryBeanName();
ReactiveWebServerFactory webServerFactory = getWebServerFactory(webServerFactoryBeanName);
StandardBeanFactory beanFactory = getBeanFactory();
boolean lazyInit = beanFactory.getBeanDefinition(webServerFactoryBeanName).isLazyInit();
this.serverManager = new WebServerManager(this, webServerFactory, this::getHttpHandler, lazyInit);
beanFactory.registerSingleton("webServerGracefulShutdown", new WebServerGracefulShutdownLifecycle(this.serverManager.getWebServer()));
beanFactory.registerSingleton("webServerStartStop", new WebServerStartStopLifecycle(this.serverManager));
}
initPropertySources();
}
Aggregations