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

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


       
        m.add(consumer);
        m.add(provider);
        // the consumer should invoke the provider here, and when done, arrive at step 3
        // finally wait for step 6 before continuing
        e.waitForStep(3, 15000);
       
        m.add(aspect);
        // after adding the aspect, we wait for its init to be invoked, arriving at
        // step 4 after an instance bound dependency was added (on a service provided by
        // provider 2)
View Full Code Here


       
        m.add(aspect);
        // after adding the aspect, we wait for its init to be invoked, arriving at
        // step 4 after an instance bound dependency was added (on a service provided by
        // provider 2)
        e.waitForStep(4, 15000);
       
        m.add(provider2);
       
        // after adding provider 2, we should now see the aspect being started, so
        // we wait for step 5 to happen
View Full Code Here

       
        m.add(provider2);
       
        // after adding provider 2, we should now see the aspect being started, so
        // 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);
       
View Full Code Here

        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);
       
        m.remove(aspect);
        // removing the aspect should trigger step 11 (in the stop method of the aspect)
        e.waitForStep(11, 15000);
       
View Full Code Here

        // is after step 10 has been reached (the client will now wait for step 12)
        e.waitForStep(10, 15000);
       
        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)
View Full Code Here

       
        // 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
        m.remove(provider2);
        m.remove(provider);
        m.remove(consumer);
View Full Code Here

        // note that we can provide an actual implementation instance here because there will be only one
        // adapter, normally you'd want to specify a Class here
        m.add(m.createResourceAdapterService("(&(path=/path/to/*.txt)(host=localhost))", false, null, "changed")
              .setImplementation(new ResourceAdapter(e)));
        // wait until the single resource is available
        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();
View Full Code Here

        // wait until the single resource is available
        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.
View Full Code Here

                  .setCallbacks("add", null, "remove", "swap")
                  .setRequired(true)
              );
         
          m.add(original);
          e.waitForStep(1 + i, 15000);         
          originals.add(original);
//          m.add(consumer);
          consumers.add(consumer);
        }
       
View Full Code Here

//          m.add(consumer);
          consumers.add(consumer);
        }
       
        m.add(aspect2);
        e.waitForStep(2 + count, 15000);
        // dumpComponents(m)
       
        for (int i = 0; i < 1; i++) {
          for (Object original : originals) {
            m.remove((Component)original);
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.