Package com.crashnote.external.config

Examples of com.crashnote.external.config.Config


    /** For use ONLY by library internals, DO NOT TOUCH not guaranteed ABI */
    public static Config defaultReference(final ClassLoader loader) {
        return computeCachedConfig(loader, "defaultReference", new Callable<Config>() {
            @Override
            public Config call() {
                final Config unresolvedResources = Parseable
                        .newResources("reference.conf",
                                ConfigParseOptions.defaults().setClassLoader(loader))
                        .parse().toConfig();
                return systemPropertiesAsConfig().withFallback(unresolvedResources).resolve();
            }
View Full Code Here


                // reset the cache if we start using a different loader
                cache.clear();
                currentLoader = loader;
            }

            final Config systemProperties = systemPropertiesAsConfig();
            if (systemProperties != currentSystemProperties) {
                cache.clear();
                currentSystemProperties = systemProperties;
            }

            Config config = cache.get(key);
            if (config == null) {
                try {
                    config = updater.call();
                } catch (RuntimeException e) {
                    throw e; // this will include ConfigException
View Full Code Here

        // create dynamic config file .. (ONLY enable client if running on AppEngine, local requests can just be passed through then)
        final String enabled =
            new AppengineUtil().isRunningOnAppengine() ? "true" : "false";

        final Config appengineConf = loader.fromString(
            "crashnote { enabled = " + enabled + ", request { ignore-localhost = false } }");

        // .. and add it to the application conf
        return appengineConf                            // #1 dynamic AppEngine props (above)
            .withFallback(super.readDefaultFileConf()); // #2 other default props
    }
View Full Code Here

    @Override
    protected Config readConf() {

        // create dynamic config file .. (ONLY enable client if running on AppEngine, local requests can just be passed through then)
        final String enabled = new AppengineUtil().isRunningOnAppengine() ? "true" : "false";
        final Config appengineConf = getConfStr("crashnote { enabled = " + enabled + ", request { ignore-localhost = false } }");

        // .. and add it to the application conf
        return super.readConf()
                .withFallback(appengineConf);
    }
View Full Code Here

TOP

Related Classes of com.crashnote.external.config.Config

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.