Examples of waitForStep()


Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()

        System.out.println("changing A props ...");
        props = new Hashtable();
        props.put("foo", "bar2");
        a.setServiceProperties(props);
       
        e.waitForStep(7, 5000);               
       
        m.remove(c);
        m.remove(a);
        m.remove(b);
       
View Full Code Here

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()

       
        m.remove(c);
        m.remove(a);
        m.remove(b);
       
        e.waitForStep(9, 5000);               
    }
}
View Full Code Here

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()

        Component sc2 = m.createComponent().setImplementation(c2 = new Client(e, false, 3));

        // Add service provider and consumer sc1 (required dependency over provider)
        m.add(sc1);
        m.add(sp);
        e.waitForStep(2, 5000);
       
        // Remove provider and consumer
        m.remove(sc1);
        m.remove(sp);
       
View Full Code Here

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()

        m.remove(sc1);
        m.remove(sp);
       
        // Add consumer sc2 (optional dependency over provider)
        m.add(sc2);
        e.waitForStep(4, 5000);    
    }

    public interface ProviderInterface {
        public boolean action();
    }
View Full Code Here

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()

             
        m.add(s1);
        m.add(s1Adapter);
        m.add(s3);
       
        e.waitForStep(3, 5000);
       
        s1Properties = new Hashtable();
        s1Properties.put("foo", "bar2");
        s1.setServiceProperties(s1Properties);
       
View Full Code Here

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()

       
        s1Properties = new Hashtable();
        s1Properties.put("foo", "bar2");
        s1.setServiceProperties(s1Properties);
       
        e.waitForStep(5, 5000);

        m.clear();
    }
}
View Full Code Here

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()

        m.add(sp1);
        // add MyClient (it should not be invoked in its start() method because MyService2 is not there
        m.add(sc);
        // remove MyClient (it should not be invoked in its stop() method because it should not be active, since MyService2 is not there.
        m.remove(sc);
        e.waitForStep(2, 5000);
    }
   
    public interface MyService1 {
    }
   
View Full Code Here

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()

            .add(new CustomDependency(toggle))
            );
       
        // make the toggle, therefore the dependency, therefore the service available
        toggle.setAvailable(true);
        e.waitForStep(1, 1000);
       
        // make the toggle unavailable again
        toggle.setAvailable(false);
        e.waitForStep(2, 1000);
    }
View Full Code Here

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()

        toggle.setAvailable(true);
        e.waitForStep(1, 1000);
       
        // make the toggle unavailable again
        toggle.setAvailable(false);
        e.waitForStep(2, 1000);
    }
   
    /** A toggle implementation that invokes a callback on every change. */
    public static class Toggle {
        private boolean m_isAvailable;
View Full Code Here

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()

       
        // now add another consumer, that matches only one resource, and uses
        // a dynamic proxy as its implementation
        m.add(dynamicProxyConsumer);
        // ensure the resource was injected properly
        e.waitForStep(4, 5000);
       
        // now change a resource and see if it gets propagated to the consumer
        provider.changeResource();
       
        // wait for change callback
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.