Examples of ConfigurationListener


Examples of org.apache.commons.configuration.event.ConfigurationListener

   
    @Test
    public void testListeners() {
        ConcurrentMapConfiguration conf = new ConcurrentMapConfiguration();
        final AtomicReference<ConfigurationEvent> eventRef = new AtomicReference<ConfigurationEvent>();
        conf.addConfigurationListener(new ConfigurationListener() {
            @Override
            public void configurationChanged(ConfigurationEvent arg0) {
                eventRef.set(arg0);
            }
           
View Full Code Here

Examples of org.apache.felix.ipojo.handlers.configuration.ConfigurationListener

     * Test that the listeners registered on the tested instance are called when the instance is reconfigured.
     */
    @Test
    public void testConfigurationListener() {
        // Register listeners
        ConfigurationListener l1 = new CountingListener();
        fooConfig.addListener(l1);
        ConfigurationListener l2 = new ThrowingListener();
        fooConfig.addListener(l2);
        ConfigurationListener l3 = new AppendingListener();
        fooConfig.addListener(l3);

        // Trigger a manual reconfiguration
        Hashtable<String, Object> conf = new Hashtable<String, Object>();
        conf.put("int", 40);
View Full Code Here

Examples of org.apache.marmotta.platform.zookeeper.listeners.ConfigurationListener

                initZooKeeper();

                String uuid = configurationService.getStringConfiguration(ZK_INSTANCE, UUID.randomUUID().toString());
                String cluster = configurationService.getStringConfiguration(ZK_CLUSTER, "default");

                ConfigurationListener listener = new ConfigurationListener(configurationService, nodeKeeper);

                nodeKeeper.addListener("/marmotta/config/[^/]+", listener );
                nodeKeeper.addListener(String.format("/marmotta/clusters/%s/config/[^/]+", cluster), listener );
                nodeKeeper.addListener(String.format("/marmotta/clusters/%s/instances/%s/config/[^/]+", cluster, uuid), listener );
View Full Code Here

Examples of org.codehaus.plexus.component.configurator.ConfigurationListener

            else
            {
                configurator = (ComponentConfigurator) pluginContainer.lookup( ComponentConfigurator.ROLE );
            }

            ConfigurationListener listener = new DebugConfigurationListener( getLogger() );

            getLogger().debug( "Configuring mojo '" + mojoDescriptor.getId() + "' -->" );
            configurator.configureComponent( plugin, configuration, expressionEvaluator,
                                             pluginContainer.getContainerRealm(), listener );
            getLogger().debug( "-- end configuration --" );
View Full Code Here

Examples of org.codehaus.plexus.component.configurator.ConfigurationListener

        throws ComponentLookupException, ComponentConfigurationException
    {
        final ComponentConfigurator configurator =
            (ComponentConfigurator) container.lookup( ComponentConfigurator.ROLE, "basic" );

        final ConfigurationListener listener = new DebugConfigurationListener( getLogger() );

        final ExpressionEvaluator expressionEvaluator = new AssemblyExpressionEvaluator( configSource );

        final XmlPlexusConfiguration configuration = new XmlPlexusConfiguration( config );
View Full Code Here

Examples of org.codehaus.plexus.component.configurator.ConfigurationListener

            else
            {
                configurator = (ComponentConfigurator) pluginContainer.lookup( ComponentConfigurator.ROLE );
            }

            ConfigurationListener listener = new DebugConfigurationListener( getLogger() );

            getLogger().debug( "Configuring mojo '" + mojoDescriptor.getId() + "' -->" );
            configurator.configureComponent( plugin, configuration, expressionEvaluator,
                                             pluginContainer.getContainerRealm(), listener );
            getLogger().debug( "-- end configuration --" );
View Full Code Here

Examples of org.codehaus.plexus.component.configurator.ConfigurationListener

        {
            // TODO: could the configuration be passed to lookup and the configurator known to plexus via the descriptor
            // so that this method could entirely be handled by a plexus lookup?
            configurator = container.lookup( ComponentConfigurator.class, configuratorId );

            ConfigurationListener listener = new DebugConfigurationListener( logger );

            ValidatingConfigurationListener validator =
                new ValidatingConfigurationListener( mojo, mojoDescriptor, listener );

            logger.debug( "Configuring mojo '" + mojoDescriptor.getId() + "' with " + configuratorId
View Full Code Here

Examples of org.codehaus.plexus.component.configurator.ConfigurationListener

        {
            // TODO: could the configuration be passed to lookup and the configurator known to plexus via the descriptor
            // so that this method could entirely be handled by a plexus lookup?
            configurator = container.lookup( ComponentConfigurator.class, configuratorId );

            ConfigurationListener listener = new DebugConfigurationListener( logger );

            ValidatingConfigurationListener validator =
                new ValidatingConfigurationListener( mojo, mojoDescriptor, listener );

            logger.debug( "Configuring mojo '" + mojoDescriptor.getId() + "' with " + configuratorId
View Full Code Here

Examples of org.codehaus.plexus.component.configurator.ConfigurationListener

            else
            {
                configurator = (ComponentConfigurator) pluginContainer.lookup( ComponentConfigurator.ROLE );
            }

            ConfigurationListener listener = new DebugConfigurationListener( getLogger() );

            getLogger().debug( "Configuring mojo '" + mojoDescriptor.getId() + "' -->" );
            configurator.configureComponent( plugin, configuration, expressionEvaluator,
                                             pluginContainer.getContainerRealm(), listener );
            getLogger().debug( "-- end configuration --" );
View Full Code Here

Examples of org.codehaus.plexus.component.configurator.ConfigurationListener

            else
            {
                configurator = (ComponentConfigurator) pluginContainer.lookup( ComponentConfigurator.ROLE );
            }

            ConfigurationListener listener = new DebugConfigurationListener( getLogger() );

            getLogger().debug( "Configuring mojo '" + mojoDescriptor.getId() + "' -->" );
            configurator.configureComponent( plugin, configuration, expressionEvaluator,
                                             pluginContainer.getContainerRealm(), listener );
            getLogger().debug( "-- end configuration --" );
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.