Package org.impalaframework.module.monitor

Examples of org.impalaframework.module.monitor.ScheduledModuleChangeMonitor


        File[] files1 = new File[] { file1, file2, };
        Resource[] resources1 = ResourceUtils.getResources(files1);
        File[] files2 = new File[] { file3, file4, };
        Resource[] resources2 = ResourceUtils.getResources(files2);
       
        ScheduledModuleChangeMonitor monitor = new ScheduledModuleChangeMonitor();
        monitor.setResourcesToMonitor("myplugin1", resources1);
        monitor.setResourcesToMonitor("myplugin2", resources2);
       
        final RecordingModuleChangeListener listener = new RecordingModuleChangeListener();
        monitor.addModificationListener(listener);
        monitor.setInitialDelay(0);
        monitor.setCheckInterval(1);
        monitor.start();

        Thread.sleep(500);
       
        FileCopyUtils.copy("file1 text modified", new FileWriter(file1));
        FileCopyUtils.copy("file2 text modified", new FileWriter(file2));
View Full Code Here

TOP

Related Classes of org.impalaframework.module.monitor.ScheduledModuleChangeMonitor

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.