Package org.apache.felix.dm.test.components

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


        // now change a resource and see if it gets propagated to the consumer
        provider.changeResource();
       
        // wait for change callback
        e.waitForStep(5, 5000);
        e.step(6);
       
        // cleanup
        m.remove(dynamicProxyConsumer);
        m.remove(resourceProvider);
        m.remove(consumer);
View Full Code Here


               );
       m.add(sp);
       m.add(sc);
       m.remove(sp);
       // ensure we executed all steps inside the component instance
       e.step(8);
   }

   static abstract class ServiceAbstract {
       public abstract void invoke();
   }
View Full Code Here

        // we wait for step 5 to happen
        e.waitForStep(5, 15000);
       
        // now we continue with step 6, which will trigger the next part of the consumer's
        // run method to be executed
        e.step(6);
       
        // invoking step 7, 8 and 9 when invoking the aspect which in turn invokes the
        // dependency and the original service, so we wait for that to finish here, which
        // is after step 10 has been reached (the client will now wait for step 12)
        e.waitForStep(10, 15000);
View Full Code Here

        m.remove(aspect);
        // removing the aspect should trigger step 11 (in the stop method of the aspect)
        e.waitForStep(11, 15000);
       
        // step 12 triggers the client to continue
        e.step(12);
       
        // wait for step 13, the final invocation of the provided service (without aspect)
        e.waitForStep(13, 15000);
       
        // clean up
View Full Code Here

        // add it, and since it has no dependencies, it should be activated immediately
        m.add(s);
        // remove it so it gets destroyed
        m.remove(s);
        // ensure we executed all steps inside the component instance
        e.step(6);
    }
   
    static class CustomComponentInstance {
        private final Ensure m_ensure;
        public CustomComponentInstance(Ensure e) {
View Full Code Here

        // remove it so it gets destroyed
        m.remove(s);
        // remove the state listener
        s.removeStateListener(implementation);
        // ensure we executed all steps inside the component instance
        e.step(10);
    }
   
    public static interface MyInterface {}

    static class ComponentStateListeningInstance implements MyInterface, ComponentStateListener {
View Full Code Here

        // add it, and since it has no dependencies, it should be activated immediately
        m.add(s);
        // remove it so it gets destroyed
        m.remove(s);
        // ensure we executed all steps inside the component instance
        e.step(10);
    }

    static class DynamicComponentStateListeningInstance implements MyInterface, ComponentStateListener {
        volatile ServiceRegistration m_registration;
        private final Ensure m_ensure;
View Full Code Here

        // add it, and since it has no dependencies, it should be activated immediately
        m.add(s);
        // remove it so it gets destroyed
        m.remove(s);
        // ensure we executed all steps inside the component instance
        e.step(10);
    }

    static class DynamicComponentStateListeningInstance2 implements MyInterface, ComponentStateListener {
        volatile ServiceRegistration m_registration;
        private final Ensure m_ensure;
View Full Code Here

        m.remove(aspect1);
        m.remove(adapter);
       
        e.waitForStep(count * 3, 15000);
        m.remove(aspect2);
        e.step(count * 3 + 1);
        m.clear();
    }
       
    static interface OriginalService {
        public void invoke();
View Full Code Here

        m.remove(sc);
        m.add(sc2);
        m.remove(sp);
        m.remove(sc2);
        // ensure we executed all steps inside the component instance
        e.step(6);
    }
   
    static interface ServiceInterface {
        public void invoke();
    }
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.