本文整理汇总了Java中org.wildfly.swarm.topology.webapp.TopologyWebAppFraction类的典型用法代码示例。如果您正苦于以下问题:Java TopologyWebAppFraction类的具体用法?Java TopologyWebAppFraction怎么用?Java TopologyWebAppFraction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TopologyWebAppFraction类属于org.wildfly.swarm.topology.webapp包,在下文中一共展示了TopologyWebAppFraction类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getImplicitDeployments
import org.wildfly.swarm.topology.webapp.TopologyWebAppFraction; //导入依赖的package包/类
@Override
public List<Archive> getImplicitDeployments(TopologyWebAppFraction fraction) throws Exception {
String context = System.getProperty(TopologyProperties.CONTEXT_PATH);
if (context == null) context = DEFAULT_CONTEXT;
List<Archive> list = new ArrayList<>();
if (fraction.exposeTopologyEndpoint()) {
WARArchive war = ShrinkWrap.create(WARArchive.class, "topology-webapp.war");
war.addAsWebInfResource(new StringAsset(getWebXml(fraction)), "web.xml");
war.addClass(TopologySSEServlet.class);
war.addModule("swarm.application");
war.addModule("org.wildfly.swarm.topology");
war.addAsWebResource(new ClassLoaderAsset("topology.js", this.getClass().getClassLoader()), "topology.js");
war.setContextRoot(context);
war.as(TopologyArchive.class);
list.add(war);
}
return list;
}
开发者ID:wildfly-swarm-archive,项目名称:wildfly-swarm-topology,代码行数:20,代码来源:TopologyWebAppConfiguration.java
示例2: getWebXml
import org.wildfly.swarm.topology.webapp.TopologyWebAppFraction; //导入依赖的package包/类
protected String getWebXml(TopologyWebAppFraction fraction) {
String webXml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<web-app xmlns=\"http://java.sun.com/xml/ns/javaee\"" +
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee" +
" http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd\"" +
" version=\"3.0\">";
Map<String, String> proxiedServiceMappings = fraction.proxiedServiceMappings();
for (String serviceName : proxiedServiceMappings.keySet()) {
String contextPath = proxiedServiceMappings.get(serviceName);
webXml += " <context-param>" +
" <param-name>" + serviceName + "-proxy</param-name>" +
" <param-value>" + contextPath + "</param-value>" +
" </context-param>";
}
webXml += "</web-app>";
return webXml;
}
开发者ID:wildfly-swarm-archive,项目名称:wildfly-swarm-topology,代码行数:21,代码来源:TopologyWebAppConfiguration.java
示例3: deployment
import org.wildfly.swarm.topology.webapp.TopologyWebAppFraction; //导入依赖的package包/类
@Produces
@Dependent()
Archive deployment() {
String context = TopologyWebAppFraction.DEFAULT_CONTEXT;
if (this.contextPath != null) {
context = this.contextPath;
}
if (fraction.exposeTopologyEndpoint()) {
WARArchive war = ShrinkWrap.create(WARArchive.class, "topology-webapp.war");
war.addAsWebInfResource(new StringAsset(getWebXml(fraction)), "web.xml");
war.addClass(TopologySSEServlet.class);
war.addModule("swarm.application");
war.addModule("org.wildfly.swarm.topology");
war.addAsWebResource(new ClassLoaderAsset("topology.js", this.getClass().getClassLoader()), "topology.js");
war.setContextRoot(context);
war.as(TopologyArchive.class);
return war;
}
return null;
}
示例4: getImplicitDeployments
import org.wildfly.swarm.topology.webapp.TopologyWebAppFraction; //导入依赖的package包/类
@Override
public List<Archive> getImplicitDeployments(TopologyWebAppFraction fraction) throws Exception {
String context = System.getProperty(TopologyProperties.CONTEXT_PATH);
if (context == null) context = DEFAULT_CONTEXT;
List<Archive> list = new ArrayList<>();
WARArchive war = ShrinkWrap.create(WARArchive.class, "topology-webapp.war");
war.addAsWebInfResource(new StringAsset(getWebXml(fraction)), "web.xml");
war.addClass(TopologySSEServlet.class);
war.addModule("swarm.application");
war.addModule("org.wildfly.swarm.topology");
war.addAsWebResource(new ClassLoaderAsset("topology.js", this.getClass().getClassLoader()), "topology.js");
war.setContextRoot(context);
war.as(TopologyArchive.class);
list.add(war);
return list;
}
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:18,代码来源:TopologyWebAppConfiguration.java
示例5: getServiceActivators
import org.wildfly.swarm.topology.webapp.TopologyWebAppFraction; //导入依赖的package包/类
@Override
public List<ServiceActivator> getServiceActivators(TopologyWebAppFraction fraction) {
List<ServiceActivator> activators = new ArrayList<>();
activators.add(new TopologyWebAppActivator(fraction.proxiedServiceMappings().keySet()));
return activators;
}
开发者ID:wildfly-swarm-archive,项目名称:wildfly-swarm-topology,代码行数:7,代码来源:TopologyWebAppConfiguration.java
示例6: getWebXml
import org.wildfly.swarm.topology.webapp.TopologyWebAppFraction; //导入依赖的package包/类
protected String getWebXml(TopologyWebAppFraction fraction) {
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<web-app xmlns=\"http://java.sun.com/xml/ns/javaee\"" +
" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
" xsi:schemaLocation=\"http://java.sun.com/xml/ns/javaee" +
" http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd\"" +
" version=\"3.0\">" +
" <context-param>" +
" <param-name>externalAddressMapper</param-name>" +
" <param-value>" + fraction.externalAddressMapper().getName() + "</param-value>" +
" </context-param>" +
"</web-app>";
}
开发者ID:wildfly-swarm-archive,项目名称:ARCHIVE-wildfly-swarm,代码行数:14,代码来源:TopologyWebAppConfiguration.java
示例7: TopologyWebAppConfiguration
import org.wildfly.swarm.topology.webapp.TopologyWebAppFraction; //导入依赖的package包/类
public TopologyWebAppConfiguration() {
super(TopologyWebAppFraction.class);
}
开发者ID:wildfly-swarm-archive,项目名称:wildfly-swarm-topology,代码行数:4,代码来源:TopologyWebAppConfiguration.java
示例8: mscServiceNameForServiceProxy
import org.wildfly.swarm.topology.webapp.TopologyWebAppFraction; //导入依赖的package包/类
public ServiceName mscServiceNameForServiceProxy(String serviceName) {
return ServiceName.of("jboss", "undertow", "handler",
TopologyWebAppFraction.proxyHandlerName(serviceName));
}
示例9: mscServiceNameForServiceProxy
import org.wildfly.swarm.topology.webapp.TopologyWebAppFraction; //导入依赖的package包/类
public ServiceName mscServiceNameForServiceProxy(String serviceName) {
return ServiceName.of("org", "wildfly", "extension", "undertow", "handler",
TopologyWebAppFraction.proxyHandlerName(serviceName));
}