You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by cs...@apache.org on 2021/03/03 16:44:04 UTC

[aries-component-dsl] 04/09: Add methods with update selectors

This is an automated email from the ASF dual-hosted git repository.

csierra pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-component-dsl.git

commit f082f840d8ddbedb37ef38d95321b601466ed30e
Author: Carlos Sierra Andrés <ca...@liferay.com>
AuthorDate: Mon Mar 1 09:42:44 2021 +0100

    Add methods with update selectors
---
 .../main/java/org/apache/aries/component/dsl/OSGi.java | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGi.java b/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGi.java
index fc6597c..4ba192b 100644
--- a/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGi.java
+++ b/component-dsl/src/main/java/org/apache/aries/component/dsl/OSGi.java
@@ -574,6 +574,24 @@ public interface OSGi<T> extends OSGiRunnable<T> {
 			(__, csr) -> onModified.test(csr));
 	}
 
+	static <T> OSGi<UpdateTuple<CachingServiceReference<T>>> serviceReferencesUpdatable(
+		Class<T> clazz) {
+
+		return new ServiceReferenceOSGi<>(null, clazz);
+	}
+
+	static OSGi<UpdateTuple<CachingServiceReference<Object>>> serviceReferencesUpdatable(
+		String filterString) {
+
+		return new ServiceReferenceOSGi<>(filterString, null);
+	}
+
+	static <T> OSGi<UpdateTuple<CachingServiceReference<T>>> serviceReferencesUpdatable(
+		Class<T> clazz, String filterString) {
+
+		return new ServiceReferenceOSGi<>(filterString, clazz);
+	}
+
 	static <T> OSGi<T> services(Class<T> clazz) {
 		return services(clazz, null);
 	}