當前位置: 首頁>>代碼示例>>Java>>正文


Java TopologyWebAppFraction類代碼示例

本文整理匯總了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;
}
 
開發者ID:wildfly-swarm,項目名稱:wildfly-swarm,代碼行數:23,代碼來源:TopologyWebAppDeploymentProducer.java

示例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));
}
 
開發者ID:wildfly-swarm-archive,項目名稱:wildfly-swarm-topology,代碼行數:5,代碼來源:TopologyProxyService.java

示例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));
}
 
開發者ID:wildfly-swarm,項目名稱:wildfly-swarm,代碼行數:5,代碼來源:TopologyProxyService.java


注:本文中的org.wildfly.swarm.topology.webapp.TopologyWebAppFraction類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。