Examples of FolderWatcher


Examples of com.nabalive.application.core.util.FolderWatcher

        if (!scriptFolder.isDirectory()) {
            throw new IllegalStateException("parameter \"apps.folder\" must point to a directory: " + APPS_FOLDER);
        }

        Runnable folderWatcher = new FolderWatcher(scriptFolder) {
            @Override
            protected void onChange(File file) {
                logger.debug("FolderWatcher onChange: {}", file.getName());
                if(!file.exists()){
                    applicationManager.unRegisterByName(stripExtension(file.getName()));
View Full Code Here

Examples of de.sflan.file.symlinker.schedule.FolderWatcher

    logger.info("Reading configuration ...");
    Config config = readConfig(configPath);
   
    logger.info("Validating configuration ...");
    validateConfig(config);
    FolderWatcher watcher = new FolderWatcher(config);

    /*
     * start the watcher
     */
    watcher.start();

    /*
     * run as long we have no shutdown file
     */
    try {
      while (!shutdownFileExists()) {
        try {
          Thread.sleep(TimeUnit.SECONDS.toMillis(20));
        } catch (InterruptedException e) {
          /*
           * ignore and continue
           */
        }

      }
    } finally {
      logger.info("Shutting down");
      /*
       * stop the watcher and end
       */
      watcher.stop();
      logger.info("Done");
    }

  }
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.