Examples of BarService


Examples of org.apache.cxf.systest.jaxb.shareclasses.service.bar.BarService

        FooService fooClient = createGetterService(FooService.class);
        assertEquals(fooClient.getName(nameElement), "Alice");
    }

    private void callBar(final NameElement nameElement) {
        BarService barClient = createGetterService(BarService.class);
        assertEquals(barClient.getName(nameElement), "Bob");
    }
View Full Code Here

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

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());

        fooBarProvider2.stop();

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

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

        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

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

        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

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

            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

Examples of org.apache.felix.ipojo.test.composite.service.BarService

    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

Examples of org.apache.felix.ipojo.test.composite.service.BarService

      ref = registry.getServiceReferences(BarService.class.getName(), "(foo=bar)");
    } catch (InvalidSyntaxException e) { 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

Examples of org.apache.felix.ipojo.test.scenarios.ps.service.BarService

   
    FooService fs = (FooService) getServiceObject(refFoo);
    assertTrue("Check fs invocation", fs.foo());
    fs = null;
   
    BarService bs = (BarService) getServiceObject(refBar);
    assertTrue("Check bs invocation", bs.bar());
    bs = null;
   
    fooBarProvider.stop();
   
    refFoo = helper.getServiceReferenceByName(FooService.class.getName(), fooBarProvider.getInstanceName());
View Full Code Here

Examples of org.apache.felix.ipojo.test.scenarios.ps.service.BarService

   
    FooService fs = (FooService) getServiceObject(refFoo);
    assertTrue("Check fs invocation", fs.foo());
    fs = null;
   
    BarService bs = (BarService) getServiceObject(refBar);
    assertTrue("Check bs invocation", bs.bar());
    bs = null;
   
    fooBarProvider2.stop();
   
    refFoo = helper.getServiceReferenceByName(FooService.class.getName(), fooBarProvider2.getInstanceName());
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.