Package org.apache.felix.dm

Examples of org.apache.felix.dm.BundleDependency


    public void testShareBundleDependencyWithMultipleServices() {
        DependencyManager m = new DependencyManager(context);
        // helper class that ensures certain steps get executed in sequence
        Ensure e = new Ensure();
        // create a service provider and consumer
        BundleDependency dependency = m.createBundleDependency().setFilter("(Bundle-SymbolicName=org.apache.felix.dependencymanager)").setRequired(true);
        Component consumer1 = m.createComponent().setImplementation(new BundleConsumer(e, 1)).add(dependency);
        Component consumer2 = m.createComponent().setImplementation(new BundleConsumer(e, 2)).add(dependency);
       
        m.add(consumer1);
        e.waitForStep(1, 15000);
View Full Code Here


    }

    private Dependency createBundleDependency(DependencyManager dm, String added, String changed,
        String removed, boolean required, boolean propagate, String filter, int stateMask, boolean instanceBound)
    {
        BundleDependency bd = dm.createBundleDependency();
        bd.setCallbacks(added, changed, removed);
        bd.setRequired(required);
        bd.setPropagate(propagate);
        if (filter != null)
        {
            bd.setFilter(filter);
        }
        if (stateMask != -1)
        {
            bd.setStateMask(stateMask);
        }
        bd.setInstanceBound(instanceBound);
        return bd;
    }
View Full Code Here

TOP

Related Classes of org.apache.felix.dm.BundleDependency

Copyright © 2018 www.massapicom. 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.