• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Deployment类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jboss.arquillian.container.spi.client.deployment.Deployment的典型用法代码示例。如果您正苦于以下问题:Java Deployment类的具体用法?Java Deployment怎么用?Java Deployment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Deployment类属于org.jboss.arquillian.container.spi.client.deployment包,在下文中一共展示了Deployment类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testPact

import org.jboss.arquillian.container.spi.client.deployment.Deployment; //导入依赖的package包/类
public void testPact(@Observes(precedence = -50) EventContext<Test> testEventContext, Deployment deployment)
    throws Throwable {

    final Test event = testEventContext.getEvent();
    final TestClass testClass = event.getTestClass();

    // We need to check this because in case of embedded containers this class is executed too
    if (RunModeUtils.isRunAsClient(deployment, testClass, event.getTestMethod())) {

        final PactVerification pactVerification = event.getTestMethod().getAnnotation(PactVerification.class);

        if (pactVerification == null) {
            logger.log(Level.INFO,
                String.format(
                    "Method %s is not annotated with %s annotation and it is going to be executed as normal junit test.",
                    event.getTestMethod().getName(), PactVerification.class.getName()));
            testEventContext.proceed();
            return;
        }

        executeConsumerTest(testEventContext, testClass, pactVerification);
    } else {
        // We are in container and this class is executed in client side so we should only pass the execution and incontainer class will do the job
        testEventContext.proceed();
    }
}
 
开发者ID:arquillian,项目名称:arquillian-algeron,代码行数:27,代码来源:ConsumerPactTest.java


示例2: getAddonEntry

import org.jboss.arquillian.container.spi.client.deployment.Deployment; //导入依赖的package包/类
private AddonId getAddonEntry(Deployment deployment)
{
   if (!deployedAddons.containsKey(deployment))
   {
      String[] coordinates = deployment.getDescription().getName().split(",");
      AddonId entry;
      if (coordinates.length == 3)
         entry = AddonId.from(coordinates[0], coordinates[1], coordinates[2]);
      else if (coordinates.length == 2)
         entry = AddonId.from(coordinates[0], coordinates[1]);
      else if (coordinates.length == 1)
         entry = AddonId.from(coordinates[0], UUID.randomUUID().toString());
      else
         entry = AddonId.from(UUID.randomUUID().toString(), UUID.randomUUID().toString());

      deployedAddons.put(deployment, entry);
   }
   return deployedAddons.get(deployment);
}
 
开发者ID:forge,项目名称:furnace,代码行数:20,代码来源:FurnaceDeployableContainer.java


示例3: stop

import org.jboss.arquillian.container.spi.client.deployment.Deployment; //导入依赖的package包/类
/**
 * @see org.jboss.arquillian.container.test.impl.client.container.ClientContainerController#stop(java.lang.String)
 */
@Override
public void stop(String containerQualifier, int timeout) {
    {
        DeploymentScenario scenario = getDeploymentScenario().get();
        if (scenario == null) {
            throw new IllegalArgumentException("No deployment scenario in context");
        }

        ContainerRegistry registry = getContainerRegistry().get();
        if (registry == null) {
            throw new IllegalArgumentException("No container registry in context");
        }

        if (!containerExists(registry.getContainers(), containerQualifier)) {
            throw new IllegalArgumentException("No container with the specified name exists");
        }

        if (!isControllableContainer(registry.getContainers(), containerQualifier)) {
            throw new IllegalArgumentException("Could not start " + containerQualifier + " container. The container life cycle is controlled by Arquillian");
        }

        Container container = getContainerRegistry().get().getContainer(new TargetDescription(containerQualifier));

        List<Deployment> managedDeployments = scenario.startupDeploymentsFor(new TargetDescription(containerQualifier));

        for (Deployment d : managedDeployments) {
            if (d.isDeployed()) {
                log.info("Automatic undeploying of the managed deployment with name " + d.getDescription().getName() +
                        " from the container with name " + container.getName());
                getContainerControllerEvent().fire(new UnDeployDeployment(container, d));
            }
        }

        log.info("Manual stopping of a server instance with timeout=" + timeout);

        getContainerControllerEvent().fire(new StopContainerWithTimeout(container, timeout));
    }
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:42,代码来源:ClientWildFlyContainerController.java


示例4: deploy

import org.jboss.arquillian.container.spi.client.deployment.Deployment; //导入依赖的package包/类
public void deploy(@Observes final AfterStart event, final ContainerRegistry registry) {
    executeInClassScope(new Callable<Void>() {
        public Void call() throws Exception {
            for (Deployment d : suiteDeploymentScenario.deployments()) {
                deploymentEvent.fire(new DeployDeployment(findContainer(registry, event.getDeployableContainer()), d));
            }
            return null;
        }
    });
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:11,代码来源:ArquillianSuiteExtension.java


示例5: undeploy

import org.jboss.arquillian.container.spi.client.deployment.Deployment; //导入依赖的package包/类
public void undeploy(@Observes final BeforeStop event, final ContainerRegistry registry) {
    executeInClassScope(new Callable<Void>() {
        public Void call() throws Exception {
            for (Deployment d : suiteDeploymentScenario.deployments()) {
                deploymentEvent.fire(new UnDeployDeployment(findContainer(registry, event.getDeployableContainer()), d));
            }
            return null;
        }
    });
}
 
开发者ID:GoogleCloudPlatform,项目名称:appengine-tck,代码行数:11,代码来源:ArquillianSuiteExtension.java


示例6: deploy

import org.jboss.arquillian.container.spi.client.deployment.Deployment; //导入依赖的package包/类
public void deploy(@Observes final AfterStart event, final ContainerRegistry registry) {

			executeInClassScope(new Callable<Void>() {
				public Void call() throws Exception {

					for (Deployment d : suiteDeploymentScenario.deployments()) {
						deploymentEvent.fire(
								new DeployDeployment(findContainer(registry, event.getDeployableContainer()), d));
					}
					return null;
				}
			});
		}
 
开发者ID:n-moser,项目名称:Conference,代码行数:14,代码来源:ArquillianSuiteExtension.java


示例7: undeploy

import org.jboss.arquillian.container.spi.client.deployment.Deployment; //导入依赖的package包/类
public void undeploy(@Observes final BeforeStop event, final ContainerRegistry registry) {

			executeInClassScope(new Callable<Void>() {
				public Void call() throws Exception {

					for (Deployment d : suiteDeploymentScenario.deployments()) {
						deploymentEvent.fire(
								new UnDeployDeployment(findContainer(registry, event.getDeployableContainer()), d));
					}
					return null;
				}
			});
		}
 
开发者ID:n-moser,项目名称:Conference,代码行数:14,代码来源:ArquillianSuiteExtension.java



注:本文中的org.jboss.arquillian.container.spi.client.deployment.Deployment类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RangeFacet类代码示例发布时间:2022-05-23
下一篇:
Java RefreshListenerAdapter类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap