當前位置: 首頁>>代碼示例>>Java>>正文


Java SetupContainer類代碼示例

本文整理匯總了Java中org.jboss.arquillian.container.spi.event.SetupContainer的典型用法代碼示例。如果您正苦於以下問題:Java SetupContainer類的具體用法?Java SetupContainer怎麽用?Java SetupContainer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SetupContainer類屬於org.jboss.arquillian.container.spi.event包,在下文中一共展示了SetupContainer類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initiateChameleon

import org.jboss.arquillian.container.spi.event.SetupContainer; //導入依賴的package包/類
private void initiateChameleon(SetupContainer setup) throws NoSuchFieldException, IllegalAccessException {
    ChameleonContainer container = (ChameleonContainer) setup.getContainer().getDeployableContainer();
    ContainerDefImpl containerDef = (ContainerDefImpl) setup.getContainer().getContainerConfiguration();
    Field containerNodeField = ContainerDefImpl.class.getDeclaredField("container");
    if (!containerNodeField.isAccessible()) {
        containerNodeField.setAccessible(true);
    }

    Node node = (Node) containerNodeField.get(containerDef);
    Map<String, String> properties = removeAndMerge(container, node, containerDef);
    if (container.isInitiated() && !properties.containsKey("chameleonTarget")) {
        return;
    }

    ChameleonConfiguration configuration = new ChameleonConfiguration();
    try {
        // Remove the Chameleon container properties from configuration
        setAndRemoveProperties(node, properties, configuration);
        configuration.validate();
    } catch (Exception e) {
        throw new RuntimeException("Could not configure Chameleon container " + setup.getContainerName(), e);
    }
    container.init(configuration, containerDef);
}
 
開發者ID:arquillian,項目名稱:arquillian-container-chameleon,代碼行數:25,代碼來源:InitiateContainer.java

示例2: isChameleonContainer

import org.jboss.arquillian.container.spi.event.SetupContainer; //導入依賴的package包/類
private boolean isChameleonContainer(SetupContainer event) {
    return event.getContainer().getDeployableContainer() instanceof ChameleonContainer;
}
 
開發者ID:arquillian,項目名稱:arquillian-container-chameleon,代碼行數:4,代碼來源:InitiateContainer.java

示例3: setupContainerObserver

import org.jboss.arquillian.container.spi.event.SetupContainer; //導入依賴的package包/類
/**
 * Use this method to do stuff that should run when the container is set up
 * 
 * @param event
 *            The observed event
 * @throws Throwable
 *             Exception while handling the event
 */
public final void setupContainerObserver(@Observes SetupContainer event)
		throws Throwable {
}
 
開發者ID:PureSolTechnologies,項目名稱:Purifinity,代碼行數:12,代碼來源:ArquillianLifecycle.java


注:本文中的org.jboss.arquillian.container.spi.event.SetupContainer類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。