Package org.apache.felix.ipojo.test.composite.service

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


 
  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

  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

    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

 
  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

  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

    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

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