use of org.apache.felix.ipojo.runtime.core.services.BazService in project felix by apache.
the class TestSimpleExport method invoke.
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();
}
use of org.apache.felix.ipojo.runtime.core.services.BazService in project felix by apache.
the class TestFilteredExport method invoke.
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();
}
use of org.apache.felix.ipojo.runtime.core.services.BazService in project felix by apache.
the class TestMultipleExport method invoke.
private boolean invoke(int nb) {
ServiceReference[] refs = osgiHelper.getServiceReferences(BazService.class.getName(), "(instance.name=" + export3.getInstanceName() + ")");
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;
}
use of org.apache.felix.ipojo.runtime.core.services.BazService in project felix by apache.
the class TestOptionalExport method invoke.
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();
}
use of org.apache.felix.ipojo.runtime.core.services.BazService in project felix by apache.
the class TestOptionalMultipleExport method invoke.
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();
}
Aggregations