Package org.apache.felix.dm

Examples of org.apache.felix.dm.DependencyManager.clear()


       

       
        // And check if the test.annotation bundle has been deactivated orderly
        e.waitForStep(11, 10000);
        m.clear();
    }
   
    public interface Sequencer
    {
        void step();
View Full Code Here


        e.waitForStep(3, 5000);
        // trigger a 'change' in our resource
        provider.change();
        // wait until the changed callback is invoked
        e.waitForStep(4, 5000);
        m.clear();
     }
   
    static class ResourceAdapter {
        protected URL m_resource; // injected by reflection.
        private Ensure m_ensure;
View Full Code Here

        check.put("a" + ASPECTS, "v" + ASPECTS);
        checkServiceProperties(check, client2Impl.getServiceProperties());
       
        // Clear all components.
        m_changeStep = null;
        m.clear();
    }   
   
    /**
     * This test does the following:
     *
 
View Full Code Here

        check.put("a" + ASPECTS, "v" + ASPECTS);
        checkServiceProperties(check, client2Impl.getServiceProperties());
       
        // Clear all components.
        m_changeStep = null;
        m.clear();
    }   
   
   private void checkServiceProperties(Map<?, ?> check, Dictionary properties) {
        for (Object key : check.keySet()) {
            Object val = check.get(key);  
View Full Code Here

                                "(" + Component.FACTORY_NAME + "=" + ServiceFactoryAnnotation.FACTORY + ")")
                        .setRequired(true).setCallbacks("bindFactory", null)));

        // Check if the test.annotation components have been initialized orderly
        m_ensure.waitForStep(10, 5000);
        m.clear();
        sr.unregister();
    }

    void bindFactory(Set factory) {
        // create a service instance with this configuration
View Full Code Here

        provider.change();
        // wait until the changed callback is invoked
        e.waitForStep(2, 5000);
       
        System.out.println("Done!");
        m.clear();
     }
   
    static class ResourceAdapter {
        protected URL m_resource; // injected by reflection.
        private Ensure m_ensure;
View Full Code Here

        // consumer has started, add the provider again
        m.remove(sp);
        m.add(sc3);
        m.add(sp);
        e.waitForStep(12, 5000);
        m.clear();
    }
   
    public interface ProviderInterface {
    }
View Full Code Here

        // wait until the changed callback is invoked
        e.waitForStep(3, 5000);       
        // wait until the changed event arrived at the component
        e.waitForStep(4, 5000);
        System.out.println("Done!");
        m.clear();
     }
   
    static class ResourceAdapter implements ServiceInterface {
        protected URL m_resource; // injected by reflection.
        private Ensure m_ensure;
View Full Code Here

         System.out.println("\n+++ Adding c1 / MyComponent1");
         // c1 have declared two extra dependency on Service3 (xx/yy).
         // both extra dependencies are available, so the c1 component should be started immediately.
         m.add(c1);
         e.waitForStep(3, 3000);
         m.clear();
     }

    /**
     * Check that list of extra dependencies (defined from init method) are handled properly.
     * The extra dependencies are added using a List object (Component.add(List)).
View Full Code Here

        // So, because we have not yet added c5 (yy), c1 should not be started currently.
        // But, now, we'll add c5 (Service3/yy) and c1 should then be started ...
        System.out.println("\n+++ Adding c5 / Service3(yy)");
        m.add(c5);
        e.waitForStep(3, 3000);
        m.clear();
    }


    public interface Service1 {}
    public interface Service2 {}
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.