Package net.jini.config

Examples of net.jini.config.ConfigurationException


            throw new NullPointerException("defaultValue cannot be null");

        final Object result = config.getEntry(component, name, type, defaultValue, data);

        if (result == null) {
            throw new ConfigurationException(String.format("entry for component %s, name %s cannot be null", component, name));
        }

        return (T) result;
    }
View Full Code Here


            DiscoveryManagement disco = (DiscoveryManagement)Config.getNonNullEntry(config,
                                                                                    BROWSER,
                                                                                    "discoveryManager",
                                                                                    DiscoveryManagement.class);
            if (!(disco instanceof DiscoveryGroupManagement)) {
                throw new ConfigurationException("discoveryManager does not support DiscoveryGroupManagement");
            } else if (!(disco instanceof DiscoveryLocatorManagement)) {
                throw new ConfigurationException("discoveryManager does not support DiscoveryLocatorManagement");
            }
            this.disco = (DiscoveryGroupManagement) disco;
            String[] groups = this.disco.getGroups();
            if (groups == null || groups.length > 0) {
                throw new ConfigurationException("discoveryManager cannot have initial groups");
            }
            if (((DiscoveryLocatorManagement) disco).getLocators().length > 0) {
                throw new ConfigurationException("discoveryManager cannot have initial locators");
            }
        } catch (NoSuchEntryException e) {
            disco = new LookupDiscoveryManager(new String[0], new LookupLocator[0], null, config);
        }
        disco.setGroups((String[]) config.getEntry(BROWSER,
View Full Code Here

TOP

Related Classes of net.jini.config.ConfigurationException

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.