Examples of checkForReloading()


Examples of org.apache.commons.configuration2.reloading.ReloadingController.checkForReloading()

                new BasicConfigurationBuilder<Configuration>(
                        PropertiesConfiguration.class);
        Configuration configuration = builder.getConfiguration();

        builder.connectToReloadingController(controller);
        controller.checkForReloading(null);
        assertTrue("Not in reloading state", controller.isInReloadingState());
        assertNotSame("No new configuration created", configuration,
                builder.getConfiguration());
        assertFalse("Still in reloading state", controller.isInReloadingState());
    }
View Full Code Here

Examples of org.apache.commons.configuration2.reloading.ReloadingController.checkForReloading()

        builder.addEventListener(ConfigurationBuilderEvent.ANY, builderListener);

        ReloadingBuilderSupportListener listener =
                ReloadingBuilderSupportListener.connect(builder, controller);
        assertNotNull("No listener returned", listener);
        controller.checkForReloading(null);
        builderListener.nextEvent(ConfigurationBuilderEvent.RESET);
        builderListener.assertNoMoreEvents();
    }

    /**
 
View Full Code Here

Examples of org.apache.commons.configuration2.reloading.ReloadingController.checkForReloading()

            assertTrue("Not a reloading builder",
                    childBuilder instanceof ReloadingControllerSupport);
            ReloadingController ctrl =
                    ((ReloadingControllerSupport) childBuilder)
                            .getReloadingController();
            ctrl.checkForReloading(null); // initialize reloading
            BuilderEventListenerImpl l = new BuilderEventListenerImpl();
            childBuilder.addEventListener(ConfigurationBuilderEvent.RESET, l);
            reloadConfig.setProperty(key, "yes");
            handler.save();
View Full Code Here

Examples of org.apache.commons.configuration2.reloading.ReloadingController.checkForReloading()

            int attempts = 10;
            boolean changeDetected;
            do
            {
                changeDetected = ctrl.checkForReloading(null);
                if (!changeDetected)
                {
                    Thread.sleep(1000);
                    handler.save(outFile);
                }
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.