本文整理汇总了Java中org.jboss.as.arquillian.api.ServerSetup类的典型用法代码示例。如果您正苦于以下问题:Java ServerSetup类的具体用法?Java ServerSetup怎么用?Java ServerSetup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ServerSetup类属于org.jboss.as.arquillian.api包,在下文中一共展示了ServerSetup类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: handleBeforeDeployment
import org.jboss.as.arquillian.api.ServerSetup; //导入依赖的package包/类
/**
* Executed before deployments to lazily execute the {@link ServerSetupTask#setup(ManagementClient, String) ServerSetupTask}.
* <p>
* This is lazily loaded for manual mode tests. The server may not have been started at the
* {@link org.jboss.arquillian.test.spi.event.suite.BeforeClass BeforeClass} event.
* </p>
*
* @param event the lifecycle event
* @param container the container the event is being invoked on
*
* @throws Throwable if an error occurs processing the event
*/
public synchronized void handleBeforeDeployment(@Observes BeforeDeploy event, Container container) throws Throwable {
final String containerName = container.getName();
if (setupTasks.containsKey(containerName)) {
setupTasks.get(containerName).deployments.add(event.getDeployment());
return;
}
final ClassContext classContext = classContextInstance.get();
if (classContext == null) {
return;
}
final Class<?> currentClass = classContext.getActiveId();
ServerSetup setup = currentClass.getAnnotation(ServerSetup.class);
if (setup == null) {
return;
}
final ManagementClient client = managementClient.get();
final ServerSetupTaskHolder holder = new ServerSetupTaskHolder(client);
holder.deployments.add(event.getDeployment());
setupTasks.put(containerName, holder);
holder.setup(setup, containerName);
}
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:38,代码来源:ServerSetupObserver.java
注:本文中的org.jboss.as.arquillian.api.ServerSetup类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论