本文整理汇总了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;未经允许,请勿转载。 |
请发表评论