Package org.apache.felix.ipojo.runtime.core.services

Examples of org.apache.felix.ipojo.runtime.core.services.BarService.bar()


        FooService fs = (FooService) osgiHelper.getRawServiceObject(refFoo);
        assertTrue("Check fs invocation", fs.foo());

        BarService bs = (BarService) osgiHelper.getRawServiceObject(refBar);
        assertTrue("Check bs invocation", bs.bar());

        fooBarProvider.stop();

        assertFalse("Check the absence of the FS from " + fooBarProvider.getInstanceName(),
                ipojoHelper.isServiceAvailableByName(FooService.class.getName(), fooBarProvider.getInstanceName()));
View Full Code Here


        FooService fs = (FooService) osgiHelper.getRawServiceObject(refFoo);
        assertTrue("Check fs invocation", fs.foo());

        BarService bs = (BarService) osgiHelper.getRawServiceObject(refBar);
        assertTrue("Check bs invocation", bs.bar());

        fooBarProvider2.stop();

        assertFalse("Check the absence of the FS from " + fooBarProvider2.getInstanceName(),
                ipojoHelper.isServiceAvailableByName(FooService.class.getName(), fooBarProvider2.getInstanceName()));
View Full Code Here

        FooService fs = (FooService) osgiHelper.getRawServiceObject(refFoo);
        assertTrue("Check fs invocation", fs.foo());

        BarService bs = (BarService) osgiHelper.getRawServiceObject(refBar);
        assertTrue("Check bs invocation", bs.bar());

        // Check properties
        String baz1 = (String) refFoo.getProperty("baz");
        String baz2 = (String) refBar.getProperty("baz");
View Full Code Here

        ServiceReference ref = registry.getServiceReference(BarService.class.getName());
        assertNotNull("Check ref not null", ref);
        assertEquals("Test property", ref.getProperty("foo"), "bar");
        BarService bar = (BarService) registry.getService(im2, ref);
        assertTrue("Test invocation", bar.bar());

        reg1.unregister();
        ref = registry.getServiceReference(BarService.class.getName());
        assertNull("Check ref null", ref);
    }
View Full Code Here

        }
        assertNotNull("Check ref not null", ref);
        assertEquals("Check ref count", ref.length, 1);
        assertEquals("Test property", ref[0].getProperty("foo"), "bar");
        BarService bar = (BarService) registry.getService(im2, ref[0]);
        assertTrue("Test invocation", bar.bar());

        ref = null;
        reg1.unregister();
        try {
            ref = registry.getServiceReferences(BarService.class.getName(), "(bar=foo)");
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.