当前位置: 首页>>代码示例>>Java>>正文


Java ObjectStore类代码示例

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


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

示例1: handleBeforeSuite

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
@Override
public void handleBeforeSuite(BeforeSuite event) throws Throwable {
    super.handleBeforeSuite(event);

    Runtime runtime = RuntimeLocator.getRuntime();
    IllegalStateAssertion.assertNull(runtime, "Embedded Runtime already created without @RunWith(Arquillian.class)");

    runtime = EmbeddedUtils.getEmbeddedRuntime();
    ObjectStore suiteStore = getSuiteObjectStore();
    suiteStore.add(Runtime.class, runtime);

    // Do additional setup
    Iterator<EmbeddedRuntimeSetup> itsetup = ServiceLoader.load(EmbeddedRuntimeSetup.class).iterator();
    while(itsetup.hasNext()) {
        EmbeddedRuntimeSetup setup = itsetup.next();
        setup.setupEmbeddedRuntime(suiteStore);
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:19,代码来源:EmbeddedSetupObserver.java

示例2: handleBeforeDeploy

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

示例3: handleBeforeStop

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的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

示例4: getSetupTasks

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public List<T> getSetupTasks() throws Exception {

    TaskList<T> taskList = null;

    // Get or create the task list with the {@link ClassContext}
    ClassContext classContext = classContextInstance.get();
    if (classContext.isActive()) {
        ObjectStore objectStore = classContext.getObjectStore();
        taskList = objectStore.get(TaskList.class);
        if (taskList == null) {
            taskList = new TaskList<T>();
            Class<?> currentClass = classContext.getActiveId();
            ContainerSetup setup = currentClass.getAnnotation(ContainerSetup.class);
            if (setup != null) {
                Class<T>[] classes = (Class<T>[]) setup.value();
                for (Class<T> clazz : classes) {
                    taskList.add(clazz.newInstance());
                }
            }
            classContext.getObjectStore().add(TaskList.class, taskList);

            ObjectStore suiteStore = getSuiteObjectStore();
            suiteStore.get(TaskList.class).addAll(taskList);
        }
    }

    return taskList != null ? taskList : new TaskList<T>();
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:30,代码来源:SetupObserver.java

示例5: handleBeforeClass

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
public void handleBeforeClass(@Observes BeforeClass event) throws Throwable {
    List<T> setupTasks = getSetupTasks();
    if (!setupTasks.isEmpty()) {
        ClassContext classContext = classContextInstance.get();
        ObjectStore suiteStore = suiteContextInstance.get().getObjectStore();
        ObjectStore classStore = classContext.getObjectStore();
        SetupContext context = getSetupContext(suiteStore, classStore);
        for (T task : setupTasks) {
            task.beforeClass(context);
        }
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:13,代码来源:SetupObserver.java

示例6: handleAfterClass

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
public void handleAfterClass(@Observes AfterClass event) throws Throwable {
    List<T> setupTasks = getSetupTasks();
    if (!setupTasks.isEmpty()) {
        ClassContext classContext = classContextInstance.get();
        ObjectStore classStore = classContext.getObjectStore();
        ObjectStore suiteStore = suiteContextInstance.get().getObjectStore();
        SetupContext context = getSetupContext(suiteStore, classStore);
        for (T task : setupTasks) {
            task.afterClass(context);
        }
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:13,代码来源:SetupObserver.java

示例7: handleAfterSuite

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void handleAfterSuite(@Observes AfterSuite event) throws Throwable {
    SuiteContext suiteContext = suiteContextInstance.get();
    TaskList<T> setupTasks = suiteContext.getObjectStore().get(TaskList.class);
    if (!setupTasks.isEmpty()) {
        ObjectStore suiteStore = suiteContext.getObjectStore();
        SetupContext context = new AbstractSetupContext(suiteStore, null);
        for (T task : setupTasks) {
            task.afterSuite(context);
        }
    }
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:13,代码来源:SetupObserver.java

示例8: createNewObjectStore

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected ObjectStore createNewObjectStore() {
    return new HashObjectStore();
}
 
开发者ID:ingwarsw,项目名称:arquillian-suite-extension,代码行数:8,代码来源:ExtendedSuiteContextImpl.java

示例9: getSetupContext

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
protected ManagedSetupContext getSetupContext(ObjectStore suiteStore, ObjectStore classStore) {
    MBeanServerConnection server = mbeanServerInstance.get();
    return new ManagedSetupContext(suiteStore, classStore, server, null);
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:7,代码来源:ManagedContainerSetupObserver.java

示例10: ManagedSetupContext

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
ManagedSetupContext(ObjectStore suiteStore, ObjectStore classStore, MBeanServerConnection server, Map<String, String> configuration) {
    super(suiteStore, classStore);
    this.server = server;
    this.configuration = configuration;
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:6,代码来源:ManagedContainerSetupObserver.java

示例11: getSetupContext

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
@SuppressWarnings("unchecked")
protected <C extends SetupContext> C getSetupContext(ObjectStore suiteStore, ObjectStore classStore) {
    return (C) new AbstractSetupContext(suiteStore, classStore);
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:5,代码来源:SetupObserver.java

示例12: getSuiteObjectStore

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
protected ObjectStore getSuiteObjectStore() {
    SuiteContext suiteContext = suiteContextInstance.get();
    return suiteContext.getObjectStore();
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:5,代码来源:SetupObserver.java

示例13: handleBeforeSuite

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
public void handleBeforeSuite(@Observes BeforeSuite event) throws Throwable {
    ObjectStore objectStore = getSuiteObjectStore();
    objectStore.add(TaskList.class, new TaskList<>());
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:5,代码来源:SetupObserver.java

示例14: AbstractSetupContext

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
public AbstractSetupContext(ObjectStore suiteStore, ObjectStore classStore) {
    this.suiteStore = suiteStore;
    this.classStore = classStore;
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:5,代码来源:SetupObserver.java

示例15: getSuiteStore

import org.jboss.arquillian.core.spi.context.ObjectStore; //导入依赖的package包/类
@Override
public ObjectStore getSuiteStore() {
    return suiteStore;
}
 
开发者ID:tdiesler,项目名称:gravia,代码行数:5,代码来源:SetupObserver.java


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