Package cu.settings

Examples of cu.settings.ConfigurationException


                if (bouncerIp != null && bouncerIp.length() > 0) {
                    bouncers.add(InetAddress.getByName(bouncerIp));
                }
            }
        } catch (UnknownHostException e) {
            throw new ConfigurationException("Failed to resolve bouncer address: " + e.getMessage(), e);
        }
    }
View Full Code Here


            final String s = get("/main/pasv_address");
            if (!"".equals(s)) {
                InetAddress.getByName(s);
            }
        } catch (UnknownHostException e) {
            throw new ConfigurationException("The supplied pasv_address did not resolve properly.", e);
        }
        try {
            final String s = get("/main/bind_address");
            if (!"".equals(s)) {
                InetAddress.getByName(s);
            }
        } catch (UnknownHostException e) {
            throw new ConfigurationException("The supplied bind_address did not resolve properly.", e);
        }

        try {
            final String s = get("/epsv/ipv4_bind_address");
            if (!"".equals(s)) {
                InetAddress.getByName(s);
            }
        } catch (UnknownHostException e) {
            throw new ConfigurationException("The supplied ipv4_bind_address did not resolve properly.", e);
        }
        try {
            final String s = get("/epsv/ipv6_bind_address");
            if (!"".equals(s)) {
                InetAddress.getByName(s);
            }
        } catch (UnknownHostException e) {
            throw new ConfigurationException("The supplied ipv6_bind_address did not resolve properly.", e);
        }
        // Note: moved section check to loadSections(), as it is now called externally

        if (!dataDirectory.exists() || !dataDirectory.isDirectory()) {
            throw new ConfigurationException("Could not find data_directory: " + dataDirectory.getAbsolutePath());
        }
        if (getInt("/user/authentication/type") == 2) {
            if (get("/user/authentication/remote/host") == null || get("/user/authentication/remote/port") == null || get("/user/authentication/remote/retry_interval") == null) {
                throw new ConfigurationException("must specify {host, port, retry_interval} when using remote authentication");
            }
        }
    }
View Full Code Here

                if (ports.length == 2) {
                    pasvHighPort = Integer.parseInt(ports[1]);
                    pasvLowPort = Integer.parseInt(ports[0]);
                }
            } catch (Exception e) {
                throw new ConfigurationException("pasv_port_range is not defined properly, make sure it contains two numbers between 0 and 65536, connected by a dash '-'. For example: 1024-2048", e);
            }
        }
    }
View Full Code Here

            i++;
            try {
                section = new Section(name, path, owner, group, ratio);
                sections.put(path, section);
            } catch (IllegalArgumentException e) {
                throw new ConfigurationException("Error in section: " + name, e);
            }

            // make sure that the sections have the proper owner and group in their parent directory listings.
            sectionDir = new File(defaultSection.getPath(), path);
            if (!sectionDir.exists()) {
View Full Code Here

            bindInetAddress = null;
        } else {
            try {
                bindInetAddress = InetAddress.getByName(bindAddress);
            } catch (UnknownHostException e) {
                throw new ConfigurationException("Could not bind to bind_address.", e);
            }
        }
        running = false;
        if (serverSocket != null) {
            serverSocket.close();
View Full Code Here

            bindAddress = null;
        } else {
            try {
                bindAddress = InetAddress.getByName(tba);
            } catch (UnknownHostException e) {
                throw new ConfigurationException("Could not bind to bind_address.", e);
            }
        }
        int port = settings.getInt("/main/port");

        running = false;
View Full Code Here

TOP

Related Classes of cu.settings.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.