本文整理了Java中io.undertow.servlet.Servlets.newContainer()
方法的一些代码示例,展示了Servlets.newContainer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Servlets.newContainer()
方法的具体详情如下:
包路径:io.undertow.servlet.Servlets
类名称:Servlets
方法名:newContainer
[英]Creates a new servlet container.
[中]创建一个新的servlet容器。
代码示例来源:origin: org.springframework.boot/spring-boot
DeploymentManager manager = Servlets.newContainer().addDeployment(deployment);
manager.deploy();
SessionManager sessionManager = manager.getDeployment().getSessionManager();
代码示例来源:origin: com.qwazr/qwazr-server
GenericServer(final GenericServerBuilder builder) throws IOException {
this.configuration = builder.configuration;
this.executorService =
builder.executorService == null ? Executors.newCachedThreadPool() : builder.executorService;
this.servletContainer = Servlets.newContainer();
this.webAppContext = builder.webAppContext;
this.webServiceContext = builder.webServiceContext;
this.webAppEndPoints = webAppContext == null ? null : Collections.unmodifiableSet(webAppContext.endPoints);
this.webServiceEndPoints =
webServiceContext == null ? null : Collections.unmodifiableSet(webServiceContext.endPoints);
builder.contextAttribute(this);
this.contextAttributes = new LinkedHashMap<>(builder.contextAttributes);
this.undertows = new ArrayList<>();
this.deploymentManagers = new ArrayList<>();
this.identityManagerProvider = builder.identityManagerProvider;
this.hostnamePrincipalResolver = builder.hostnamePrincipalResolver;
this.webAppAccessLogger = builder.webAppAccessLogger;
this.webServiceAccessLogger = builder.webServiceAccessLogger;
this.udpServer = buildUdpServer(builder, configuration);
this.startedListeners = CollectionsUtils.copyIfNotEmpty(builder.startedListeners, ArrayList::new);
this.shutdownListeners = CollectionsUtils.copyIfNotEmpty(builder.shutdownListeners, ArrayList::new);
this.connectorsStatistics = new ArrayList<>();
this.registeredObjectNames = new LinkedHashSet<>();
}
代码示例来源:origin: yangfuhai/jboot
servletContainer = Servlets.newContainer();
deploymentManager = servletContainer.addDeployment(deploymentInfo);
deploymentManager.deploy();
内容来源于网络,如有侵权,请联系作者删除!