Examples of foo()


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

        ServiceReference ref2 = ipojoHelper.getServiceReferenceByName(FooService.class.getName(), name);
        assertNotNull("Check the foo service availability", ref2);
        FooService fs = (FooService) osgiHelper.getRawServiceObject(ref2);

        fs.foo(); // This trigger the changes.

        assertEquals("check foo value", FooService.VALUE_2, cs.getProps().get("foo"));
    }

}
View Full Code Here

Examples of org.apache.felix.ipojo.test.composite.service.BazService.foo()

 
  private boolean invoke() {
    ServiceReference ref = Utils.getServiceReferenceByName(getContext(), 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.test.composite.service.BazService.foo()

 
  private boolean invoke() {
    ServiceReference ref = Utils.getServiceReferenceByName(getContext(), 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.test.composite.service.BazService.foo()

  private boolean invoke() {
    ServiceReference ref = Utils.getServiceReferenceByName(getContext(), BazService.class.getName(), export3.getInstanceName());
    if(ref == null) { return false; }
    BazService fs = (BazService) getContext().getService(ref);
    getContext().ungetService(ref);
    return fs.foo();
  }
 
  private boolean invoke(int nb) {
    ServiceReference[] refs = Utils.getServiceReferences(getContext(), BazService.class.getName(), "(instance.name="+export3.getInstanceName()+")");
    if(refs == null) { return false; }
View Full Code Here

Examples of org.apache.felix.ipojo.test.composite.service.BazService.foo()

    if(refs == null) { return false; }
    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.test.composite.service.BazService.foo()

 
  private boolean invoke() {
    ServiceReference ref = Utils.getServiceReferenceByName(getContext(), 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.test.composite.service.BazService.foo()

  private boolean invoke() {
    ServiceReference ref = Utils.getServiceReferenceByName(getContext(), BazService.class.getName(), export3.getInstanceName());
    if(ref == null) { return false; }
    BazService fs = (BazService) getContext().getService(ref);
    getContext().ungetService(ref);
    return fs.foo();
  }
 
  private boolean invoke(int nb) {
    ServiceReference[] refs = Utils.getServiceReferences(getContext(), BazService.class.getName(), "(instance.name="+export3.getInstanceName()+")");
    if(refs == null) { return false; }
View Full Code Here

Examples of org.apache.felix.ipojo.test.composite.service.BazService.foo()

    if(refs == null) { return false; }
    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.test.composite.service.FooService.foo()

    ServiceContext sc = Utils.getServiceContext(import3);
    ServiceReference[] refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
    assertNotNull("Test foo availability inside the composite - 1", refs);
    assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
    FooService fs = (FooService) sc.getService(refs[0]);
    assertTrue("Test foo invocation", fs.foo());
    sc.ungetService(refs[0]);
   
    foo1.stop();
    assertTrue("Test component validity", import3.getState() == ComponentInstance.VALID);
    sc = Utils.getServiceContext(import3);
View Full Code Here

Examples of org.apache.felix.ipojo.test.composite.service.FooService.foo()

    sc = Utils.getServiceContext(import3);
    refs = Utils.getServiceReferences(sc, FooService.class.getName(), null);
    assertNotNull("Test foo availability inside the composite - 1", refs);
    assertEquals("Test foo availability inside the composite - 1.2", refs.length, 1);
    fs = (FooService) sc.getService(refs[0]);
    assertTrue("Test foo invocation", fs.foo());
    sc.ungetService(refs[0]);
   
    // Stop the second provider
    foo2.stop();   
    assertTrue("Test component validity - 2", import3.getState() == ComponentInstance.VALID);
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.