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

Java BeforeStop类代码示例

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

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



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

示例1: stopContainerWithTimeout

import org.jboss.arquillian.container.spi.event.container.BeforeStop; //导入依赖的package包/类
@SuppressWarnings("UnusedDeclaration")
public void stopContainerWithTimeout(@Observes final StopContainerWithTimeout stopEvent) throws Exception {
    forContainer(stopEvent.getContainer(), new Operation<Container>() {
        @Override
        public void perform(Container container) throws Exception {
            event.fire(new BeforeStop(container.getDeployableContainer()));
            try {
                if (container.getState().equals(Container.State.STARTED)) {
                    CommonDeployableContainer c = (CommonDeployableContainer) container.getDeployableContainer();
                    c.stop(stopEvent.getTimeout());
                }
                container.setState(Container.State.STOPPED);
            } catch (LifecycleException e) {
                container.setState(Container.State.STOPPED_FAILED);
                throw e;
            }
            event.fire(new AfterStop(container.getDeployableContainer()));
        }
    });
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:21,代码来源:WildFlyContainerLifecycleController.java


示例2: undeploy

import org.jboss.arquillian.container.spi.event.container.BeforeStop; //导入依赖的package包/类
public synchronized void undeploy(@Observes BeforeStop event, Container container, ServiceArchiveHolder archiveHolder) {
    // clean up if we deployed to this container?
    if (serviceArchiveDeployed.contains(container.getName())) {
        try {
            Archive<?> serviceArchive = archiveHolder.getArchive();
            log.infof("Undeploy arquillian service: %s", serviceArchive);
            DeployableContainer<?> deployableContainer = container.getDeployableContainer();
            deployableContainer.undeploy(serviceArchive);
            serviceArchiveDeployed.remove(container.getName());
        } catch (Throwable th) {
            log.error("Cannot undeploy arquillian service", th);
        }
    }
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:15,代码来源:ArquillianServiceDeployer.java


示例3: teardownMessaging

import org.jboss.arquillian.container.spi.event.container.BeforeStop; //导入依赖的package包/类
public void teardownMessaging(@Observes BeforeStop event) throws CommandFailedException, IOException, InterruptedException, TimeoutException {
    final OnlineManagementClient client = managementClient.get();
    client.apply(new CliFile(new File("src/test/resources/jms-cleanup-wildfly.cli")));

    Administration administration = new Administration(client);
    administration.reloadIfRequired();

    client.close();
}
 
开发者ID:aerogear,项目名称:aerogear-unifiedpush-server,代码行数:10,代码来源:MessagingSetup.java


示例4: undeploy

import org.jboss.arquillian.container.spi.event.container.BeforeStop; //导入依赖的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


示例5: undeploy

import org.jboss.arquillian.container.spi.event.container.BeforeStop; //导入依赖的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


示例6: handleBeforeStop

import org.jboss.arquillian.container.spi.event.container.BeforeStop; //导入依赖的package包/类
public void handleBeforeStop(@Observes BeforeStop event, Container container) throws Throwable {
    List<ManagedSetupTask> setupTasks = getSetupTasks();
    if (!setupTasks.isEmpty()) {
        ObjectStore suiteStore = suiteContextInstance.get().getObjectStore();
        MBeanServerConnection server = mbeanServerInstance.get();
        Map<String, String> props = container.getContainerConfiguration().getContainerProperties();
        ManagedSetupContext context = new ManagedSetupContext(suiteStore, null, server, props);
        for (ManagedSetupTask task : setupTasks) {
            task.beforeStop(context);
        }
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:13,代码来源:ManagedContainerSetupObserver.java


示例7: undeploy

import org.jboss.arquillian.container.spi.event.container.BeforeStop; //导入依赖的package包/类
/**
 * Undeploy event.
 *
 * @param event event to observe
 */
public void undeploy(@Observes final BeforeStop event) {
    debug("Catching BeforeStop event {0}", event.toString());
    undeployDeployments = true;
    undeployEvent.fire(new UnDeployManagedDeployments());
}
 
开发者ID:ingwarsw,项目名称:arquillian-suite-extension,代码行数:11,代码来源:ArquillianSuiteExtension.java


示例8: beforeStopObserver

import org.jboss.arquillian.container.spi.event.container.BeforeStop; //导入依赖的package包/类
/**
 * Use this method to do stuff that should run before container stop
 * 
 * @param event
 *            The observed event
 * @throws Throwable
 *             Exception while handling the event
 */
public final void beforeStopObserver(@Observes BeforeStop event)
		throws Throwable {
}
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:12,代码来源:ArquillianLifecycle.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java SslError类代码示例发布时间:2022-05-23
下一篇:
Java IllegalWorkerStateException类代码示例发布时间: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