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

Examples of org.apache.felix.ipojo.runtime.core.services.FooService.foo()


            }
        }

        // Invoke
        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
        assertTrue("invoke fs", fs.foo());

        // Re-check the property (change)
        intProp = (Integer) sr.getProperty("int");
        boolProp = (Boolean) sr.getProperty("boolean");
        strProp = (String) sr.getProperty("string");
View Full Code Here


            }
        }

        // Invoke
        FooService fs = (FooService) osgiHelper.getRawServiceObject(sr);
        assertTrue("invoke fs", fs.foo());

        // Re-check the property (change)
        intProp = (Integer) sr.getProperty("int");
        boolProp = (Boolean) sr.getProperty("boolean");
        strProp = (String) sr.getProperty("string");
View Full Code Here

        assertNull(osgiHelper.getServiceReference(CheckService.class.getName()));
        assertNotNull(osgiHelper.getServiceReference(FooService.class.getName()));

        FooService fs = (FooService) osgiHelper.getServiceObject(FooService.class.getName(), null);
        fs.foo();

        assertNull(osgiHelper.getServiceReference(CheckService.class.getName()));
        assertNull(osgiHelper.getServiceReference(FooService.class.getName()));

        ci.dispose();
View Full Code Here

        // CheckService not available
        assertNull(osgiHelper.getServiceReference(CheckService.class.getName()));
        assertNotNull(osgiHelper.getServiceReference(FooService.class.getName()));

        FooService fs = (FooService) osgiHelper.getServiceObject(FooService.class.getName(), null);
        fs.foo();

        assertNull(osgiHelper.getServiceReference(CheckService.class.getName()));
        assertNull(osgiHelper.getServiceReference(FooService.class.getName()));

        ci.dispose();
View Full Code Here

        // CheckService not available
        assertNull(osgiHelper.getServiceReference(CheckService.class.getName()));
        assertNotNull(osgiHelper.getServiceReference(FooService.class.getName()));

        FooService fs = (FooService) osgiHelper.getServiceObject(FooService.class.getName(), null);
        fs.foo();

        assertNull(osgiHelper.getServiceReference(CheckService.class.getName()));
        assertNull(osgiHelper.getServiceReference(FooService.class.getName()));

        ci.dispose();
View Full Code Here

        assertNull(ref.getProperty("prop1"));
        assertNotNull(ref.getProperty("prop2"));

        // Test foo invocation
        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
        assertTrue("FooService invocation failed", fs.foo());

        ref = osgiHelper.getServiceReference(FooService.class.getName(), "(" + "instance.name" + "=" + compName + ")");
        // Check service properties
        assertNotNull(ref.getProperty("prop1"));
        assertNull(ref.getProperty("prop2"));
View Full Code Here

        assertNotNull("FS not available", ref);

        // Test foo invocation
        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
        assertTrue("FooService invocation failed", fs.foo());

        ipojoHelper.dispose();


        // Check that there is no more FooService
View Full Code Here

        assertEquals("my.pid", ref.getProperty(Constants.SERVICE_PID));


        // Test foo invocation
        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref);
        assertTrue("FooService invocation failed", fs.foo());

        ipojoHelper.dispose();


        // Check that there is no more FooService
View Full Code Here

        TimeUtils.grace(500);
        osgiHelper.waitForService(FooService.class, null, 10000);

        // Check configuration
        FooService fs = osgiHelper.getServiceObject(FooService.class);
        Assert.assertTrue(fs.foo());
        Assert.assertEquals(fs.getDouble(), 1.0, 0);
        Assert.assertEquals(fs.getInt(), 1);
        Assert.assertEquals(fs.getLong(), 1l);
    }
View Full Code Here

        assertTrue("Check invocation", bs.foo());
        getContext().ungetService(ref);
        ref = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), "mon_coeur");
        assertNotNull("Check ref 2 ", ref);
        FooService fs = (FooService) getContext().getService(ref);
        assertTrue("Check invocation", fs.foo());
        getContext().ungetService(ref);
        ci.dispose();
    }

    @Test
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.