Examples of BazService


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

        }

        ComponentInstance ci = ipojoHelper.createComponentInstance("org.apache.felix.ipojo.runtime.core.components" +
                ".nativ.NativeComponent");

        BazService baz = osgiHelper.getServiceObject(BazService.class, "(instance.name=" + ci.getInstanceName() +")");
        assertEquals("foo: Test program of JNI.", baz.hello(""));
    }
View Full Code Here

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


        List<BazService> services = osgiHelper.getServiceObjects(BazService.class);
        assertEquals(1, services.size());

        BazService baz = services.get(0);
        assertEquals("Hello Guillaume", baz.hello("Guillaume"));
        ipojoHelper.dispose();
    }
View Full Code Here

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

    private boolean invoke() {
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(BazService.class.getName(), export3.getInstanceName());
        if (ref == null) {
            return false;
        }
        BazService fs = (BazService) getContext().getService(ref);
        getContext().ungetService(ref);
        return fs.foo();
    }
View Full Code Here

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

        }
        if (nb > refs.length) {
            return false;
        }
        for (int i = 0; i < nb; i++) {
            BazService fs = (BazService) getContext().getService(refs[i]);
            getContext().ungetService(refs[i]);
            if (!fs.foo()) {
                return false;
            }
        }
        return true;
    }
View Full Code Here

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

    private boolean invoke() {
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(BazService.class.getName(), export2.getInstanceName());
        if (ref == null) {
            return false;
        }
        BazService fs = (BazService) getContext().getService(ref);
        return fs.foo();
    }
View Full Code Here

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

    private boolean invoke() {
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(BazService.class.getName(), export1.getInstanceName());
        if (ref == null) {
            return false;
        }
        BazService fs = (BazService) getContext().getService(ref);
        return fs.foo();
    }
View Full Code Here

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

    private boolean invoke() {
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(BazService.class.getName(), export1.getInstanceName());
        if (ref == null) {
            return false;
        }
        BazService fs = (BazService) getContext().getService(ref);
        return fs.foo();
    }
View Full Code Here

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

    private boolean invoke() {
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(BazService.class.getName(), export3.getInstanceName());
        if (ref == null) {
            return false;
        }
        BazService fs = (BazService) getContext().getService(ref);
        getContext().ungetService(ref);
        return fs.foo();
    }
View Full Code Here

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

        }
        if (nb > refs.length) {
            return false;
        }
        for (int i = 0; i < nb; i++) {
            BazService fs = (BazService) getContext().getService(refs[i]);
            getContext().ungetService(refs[i]);
            if (!fs.foo()) {
                return false;
            }
        }
        return true;
    }
View Full Code Here

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

        }

        assertTrue("Check ci", ci.getState() == ComponentInstance.VALID);
        ServiceReference ref = ipojoHelper.getServiceReferenceByName(BazService.class.getName(), "mon_coeur");
        assertNotNull("Check ref", ref);
        BazService bs = (BazService) getContext().getService(ref);
        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());
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.