• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ConfigurationException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: loadConfiguration

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
public static InputStream loadConfiguration(String resourceName, boolean isDefault) {
    InputStream stream = loadResource(resourceName);
    if (stream == null) {
        if (isDefault) {
            throw new IllegalStateException(
                "Could not find built-in configuration as file nor classloader resource: " + resourceName + ". " +
                    "Make sure that this file exists in classpath resource or in the project folder.");
        } else {
            throw new ConfigurationException(
                "Could not locate configured containerConfigurationFile as file" +
                    " nor classloader resource: " + resourceName);
        }
    }

    return stream;
}
 
开发者ID:arquillian,项目名称:arquillian-container-chameleon,代码行数:17,代码来源:FileUtils.java


示例2: from

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
public static Target from(String source) {
    Target target = new Target();

    String[] sections = source.split(":");
    if (sections.length < 2 || sections.length > 3) {
        throw new ConfigurationException("Wrong target format [" + source + "] server:version:type");
    }
    target.server = sections[0].toLowerCase();
    target.version = sections[1];
    if (sections.length > 2) {
        for (Type type : Type.values()) {
            if (sections[2].toLowerCase().contains(type.name().toLowerCase())) {
                target.type = type;
                break;
            }
        }
        if (target.type == null) {
            throw new ConfigurationException(
                "Unknown target type " + sections[2] + ". Supported " + Target.Type.values());
        }
    } else {
        target.type = Type.Default;
    }
    return target;
}
 
开发者ID:arquillian,项目名称:arquillian-container-chameleon,代码行数:26,代码来源:Target.java


示例3: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
public void validate() throws ConfigurationException {
    if (chameleonTarget == null) {
        throw new ConfigurationException("chameleonTarget must be provided in format server:version:type");
    }

    // Trigger possible Exception case during File/Resource load
    getChameleonContainerConfigurationFileStream();

    File resolveCache = getChameleonResolveCacheFolder();
    if (!resolveCache.exists()) {
        if (!resolveCache.mkdirs()) {
            throw new ConfigurationException("Could not create all resolve cache folders: " + resolveCache);
        }
    }

    // Try to parse to 'trigger' ConfigurationException
    getParsedTarget();
}
 
开发者ID:arquillian,项目名称:arquillian-container-chameleon,代码行数:19,代码来源:ChameleonConfiguration.java


示例4: getStatusCheckURI

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
private URI getStatusCheckURI(URI contextURI, String contextPath) {

        URI uri = null;

        try {
            uri = new URI(
                contextURI.getScheme(),
                contextURI.getUserInfo(),
                contextURI.getHost(),
                contextURI.getPort(),
                (contextURI.getPath() + "/" + contextPath).replaceAll("(//)+", "/"),
                contextURI.getQuery(),
                null);
        } catch (URISyntaxException ex) {
            throw new ConfigurationException(ex);
        }

        return uri;
    }
 
开发者ID:aerogear,项目名称:aerogear-testing-tools,代码行数:20,代码来源:NonDeployingContainer.java


示例5: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 *
 * @see org.jboss.arquillian.container.spi.client.container.ContainerConfiguration#validate()
 */
@Override
public void validate() throws ConfigurationException {
    if (host == null || host.length() == 0) {
        this.host = "localhost";
    }
    if (port == null || port.length() == 0) {
        this.port = "12345";
    }
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:15,代码来源:DaemonContainerConfigurationBase.java


示例6: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
public void validate() throws ConfigurationException {
    if (cubeConfiguration == null)
        throw new ConfigurationException("CubeConfiguration is null");

    if (isNullOrEmpty(cubeConfiguration.getMasterUrl().toString()))
        throw new ConfigurationException("NULL master URL");

    if ((isNullOrEmpty(openshiftUsername) || isNullOrEmpty(openshiftPassword)) && isNullOrEmpty(token)) {
        throw new ConfigurationException("Missing OpenShift authentification -- username/password or token!");
    }
}
 
开发者ID:jboss-openshift,项目名称:ce-arq,代码行数:12,代码来源:Configuration.java


示例7: shouldFailOnMissingContainerFile

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
@Test(expected = ConfigurationException.class)
public void shouldFailOnMissingContainerFile() throws Exception {
    ChameleonConfiguration configuration = new ChameleonConfiguration();
    configuration.setChameleonContainerConfigurationFile("MISSING");
    configuration.setChameleonTarget("wildfly:8.2.0.Final:managed");
    configuration.validate();
}
 
开发者ID:arquillian,项目名称:arquillian-container-chameleon,代码行数:8,代码来源:ConfigurationTestCase.java


示例8: getAppURI

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
/**
 * 
 * @return URI of application form configuration
 */
private URI getAppURI() {
    URI uri = null;
    try {
        uri = new URI(configurationProducer.get().getBaseURI());
    } catch (URISyntaxException e) {
        throw new ConfigurationException("Parameter \"baseURI\" does not represent a valid URI", e);
    }

    return uri;
}
 
开发者ID:aerogear,项目名称:aerogear-testing-tools,代码行数:15,代码来源:NonDeployingContainer.java


示例9: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
@Override
public void validate() throws ConfigurationException {
    super.validate();

    Validate.configurationDirectoryExists(jbossHome, "jbossHome '" + jbossHome + "' must exist");
    if (javaHome != null) {
        Validate.configurationDirectoryExists(javaHome, "javaHome must exist");
    }
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:10,代码来源:ManagedDomainContainerConfiguration.java


示例10: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
/**
 * {@inheritDoc}
 *
 * @see org.jboss.as.arquillian.container.CommonContainerConfiguration#validate()
 */
@Override
public void validate() throws ConfigurationException {
    super.validate();
    Validate.configurationDirectoryExists(jbossHome, "jbossHome '" + jbossHome + "' must exist");
    Validate.configurationDirectoryExists(modulePath, "modulePath '" + modulePath + "' must exist");
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:12,代码来源:EmbeddedContainerConfiguration.java


示例11: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
@Override
public void validate() throws ConfigurationException {
    super.validate();
    if (jbossHome != null)
        Validate.configurationDirectoryExists(jbossHome, "jbossHome '" + jbossHome + "' must exist");
    if (javaHome != null)
        Validate.configurationDirectoryExists(javaHome, "javaHome '" + javaHome + "' must exist");
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:9,代码来源:DistributionContainerConfiguration.java


示例12: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
@Override
public void validate() throws ConfigurationException
{
   if (Strings.isNullOrEmpty(classifier))
   {
      throw new ConfigurationException("Classifier should not be null or empty");
   }
}
 
开发者ID:forge,项目名称:furnace,代码行数:9,代码来源:FurnaceContainerConfiguration.java


示例13: shouldFailOnMissingContainerType

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
@Test(expected = ConfigurationException.class)
public void shouldFailOnMissingContainerType() throws Exception {
    ChameleonConfiguration configuration = new ChameleonConfiguration();
    configuration.setChameleonTarget("wildfly:8.2.0.Final:UNKNOWN");
    configuration.validate();
}
 
开发者ID:arquillian,项目名称:arquillian-container-chameleon,代码行数:7,代码来源:ConfigurationTestCase.java


示例14: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
@Override
public void validate() throws ConfigurationException {
}
 
开发者ID:arquillian,项目名称:arquillian-cube,代码行数:4,代码来源:ContainerlessConfiguration.java


示例15: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
public void validate() throws ConfigurationException {
    if (bindHttpPort == RANDOM_PORT_FLAG) {
        bindHttpPort = generateRandomPort();
    }
}
 
开发者ID:arquillian,项目名称:arquillian-container-undertow,代码行数:6,代码来源:UndertowContainerConfiguration.java


示例16: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
@Override
public void validate() throws ConfigurationException {
    if (username != null && password == null) {
        throw new ConfigurationException("username has been set, but no password given");
    }
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:7,代码来源:CommonDomainContainerConfiguration.java


示例17: shouldValidateThatModulePathIsNonExisting

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
@Test(expected = ConfigurationException.class)
public void shouldValidateThatModulePathIsNonExisting() {
    final EmbeddedContainerConfiguration conf = new EmbeddedContainerConfiguration();
    conf.setModulePath("");
    validate(conf);
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:7,代码来源:EmbeddedContainerConfigurationTestCase.java


示例18: shouldValidateThatJbossHomePathIsNonExisting

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
@Test(expected = ConfigurationException.class)
public void shouldValidateThatJbossHomePathIsNonExisting() {
    final EmbeddedContainerConfiguration conf = new EmbeddedContainerConfiguration();
    conf.setJbossHome(null);
    conf.validate();
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:7,代码来源:EmbeddedContainerConfigurationTestCase.java


示例19: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
@Override
public void validate() throws ConfigurationException {
    super.validate();
}
 
开发者ID:wildfly,项目名称:wildfly-arquillian,代码行数:5,代码来源:ManagedContainerConfiguration.java


示例20: validate

import org.jboss.arquillian.container.spi.ConfigurationException; //导入依赖的package包/类
public void validate() throws ConfigurationException {
}
 
开发者ID:apache,项目名称:tomee,代码行数:3,代码来源:TomEEConfiguration.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PeList类代码示例发布时间:2022-05-22
下一篇:
Java InlineKeyboardMarkup类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap