Package org.eclipse.jetty.start

Examples of org.eclipse.jetty.start.StartIni


        if (canHaveArgs)
        {
            Path iniFile = dir.resolve("start.ini");
            if (FS.canReadFile(iniFile))
            {
                StartIni ini = new StartIni(iniFile);
                args.addAll(ini.getLines(),iniFile);
                parseAllArgs(ini.getLines(),iniFile.toString());
            }

            Path startDdir = dir.resolve("start.d");

            if (FS.canReadDirectory(startDdir))
            {
                DirectoryStream.Filter<Path> filter = new DirectoryStream.Filter<Path>()
                {
                    PathMatcher iniMatcher = PathMatchers.getMatcher("glob:**/start.d/*.ini");

                    @Override
                    public boolean accept(Path entry) throws IOException
                    {
                        return iniMatcher.matches(entry);
                    }
                };

                List<Path> paths = new ArrayList<>();

                for (Path diniFile : Files.newDirectoryStream(startDdir,filter))
                {
                    if (FS.canReadFile(diniFile))
                    {
                        paths.add(diniFile);
                    }
                }

                Collections.sort(paths,new NaturalSort.Paths());

                for (Path diniFile : paths)
                {
                    StartLog.debug("Reading %s/start.d/%s - %s",id,diniFile.getFileName(),diniFile);
                    StartIni ini = new StartIni(diniFile);
                    args.addAll(ini.getLines(),diniFile);
                    parseAllArgs(ini.getLines(),diniFile.toString());
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.start.StartIni

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.