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

Examples of org.apache.felix.ipojo.runtime.core.services.BarService


        assertSame("Check service reference equality", refFoo, refBar);

        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


        assertSame("Check service reference equality", refFoo, refBar);

        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

        assertNotSame("Check service reference inequality", refFoo, refBar);

        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

        ServiceRegistration reg1 = registry.registerService(im, BarService.class.getName(), new barProvider(), props);

        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

            fail("Registry query fail : " + e.getMessage());
        }
        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

Related Classes of org.apache.felix.ipojo.runtime.core.services.BarService

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.