本文整理匯總了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);
}
示例2: isChameleonContainer
import org.jboss.arquillian.container.spi.event.SetupContainer; //導入依賴的package包/類
private boolean isChameleonContainer(SetupContainer event) {
return event.getContainer().getDeployableContainer() instanceof ChameleonContainer;
}
示例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 {
}