DirectoryScannerConfig
This class is annotated for XML binding.
179180181182183184185186187188189
final ScanManagerMXBean manager = ScanManager.register(); try { final String tmpdir = System.getProperty("java.io.tmpdir"); final ScanDirConfigMXBean config = manager.getConfigurationMBean(); final DirectoryScannerConfig bean = config.addDirectoryScanner("test1",tmpdir,".*",0,0); config.addDirectoryScanner("test2",tmpdir,".*",0,0); config.addDirectoryScanner("test3",tmpdir,".*",0,0); manager.applyConfiguration(true); final DirectoryScannerMXBean proxy =
247248249250251252253254255256257258259
* Test of getState method, of class com.sun.jmx.examples.scandir.DirectoryScanner. */ public void testGetState() { System.out.println("getState"); final DirectoryScannerConfig bean = new DirectoryScannerConfig("test"); bean.setRootDirectory(System.getProperty("java.io.tmpdir")); final ResultLogManager log = new ResultLogManager(); DirectoryScanner instance = new DirectoryScanner(bean,log); ScanState expResult = STOPPED;
280281282283284285286287288289290
} }; try { final String tmpdir = System.getProperty("java.io.tmpdir"); final ScanDirConfigMXBean config = manager.getConfigurationMBean(); final DirectoryScannerConfig bean = config.addDirectoryScanner("test1",tmpdir,".*",0,0); manager.applyConfiguration(true); final DirectoryScannerMXBean proxy = manager.getDirectoryScanners().get("test1"); doTestOperation(proxy,op,