Class Utils
- java.lang.Object
-
- org.apache.aries.jax.rs.whiteboard.internal.utils.Utils
-
public class Utils extends Object
- Author:
- Carlos Sierra Andrés
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String[]
canonicalize(Object propertyValue)
static String
canonicalizeAddress(String address)
static String
generateApplicationName(PropertyHolder propertyHolder)
static Map<String,Object>
getApplicationProperties(org.apache.aries.component.dsl.CachingServiceReference<?> reference)
static Map<String,Object>
getProperties(org.apache.aries.component.dsl.CachingServiceReference<?> sref)
static Map<String,Object>
getProperties(org.osgi.framework.ServiceReference<?> sref)
static String
getString(Object string)
static <K,T extends Comparable<? super T>>
org.apache.aries.component.dsl.OSGi<T>highestPer(Function<T,org.apache.aries.component.dsl.OSGi<K>> keySupplier, org.apache.aries.component.dsl.OSGi<T> program, Consumer<? super T> onAddingShadowed, Consumer<? super T> onRemovedShadowed)
static boolean
isAvailable(org.osgi.framework.ServiceReference<?> serviceReference)
static void
mergePropertyMaps(Map<String,Object> receptor, Map<String,?> map)
static <T> org.apache.aries.component.dsl.OSGi<ServiceTuple<T>>
onlyGettables(org.apache.aries.component.dsl.OSGi<org.apache.aries.component.dsl.CachingServiceReference<T>> program, Consumer<org.apache.aries.component.dsl.CachingServiceReference<T>> whenAddedNotGettable, Consumer<org.apache.aries.component.dsl.CachingServiceReference<T>> whenLeavingNotGettable, org.slf4j.Logger log)
static <T> org.apache.aries.component.dsl.OSGi<T>
service(org.apache.aries.component.dsl.CachingServiceReference<T> immutableServiceReference)
static void
updateProperty(org.osgi.framework.ServiceRegistration<?> serviceRegistration, String key, Object value)
-
-
-
Method Detail
-
generateApplicationName
public static String generateApplicationName(PropertyHolder propertyHolder)
-
getApplicationProperties
public static Map<String,Object> getApplicationProperties(org.apache.aries.component.dsl.CachingServiceReference<?> reference)
-
getProperties
public static Map<String,Object> getProperties(org.apache.aries.component.dsl.CachingServiceReference<?> sref)
-
getProperties
public static Map<String,Object> getProperties(org.osgi.framework.ServiceReference<?> sref)
-
highestPer
public static <K,T extends Comparable<? super T>> org.apache.aries.component.dsl.OSGi<T> highestPer(Function<T,org.apache.aries.component.dsl.OSGi<K>> keySupplier, org.apache.aries.component.dsl.OSGi<T> program, Consumer<? super T> onAddingShadowed, Consumer<? super T> onRemovedShadowed)
-
isAvailable
public static boolean isAvailable(org.osgi.framework.ServiceReference<?> serviceReference)
-
mergePropertyMaps
public static void mergePropertyMaps(Map<String,Object> receptor, Map<String,?> map)
-
onlyGettables
public static <T> org.apache.aries.component.dsl.OSGi<ServiceTuple<T>> onlyGettables(org.apache.aries.component.dsl.OSGi<org.apache.aries.component.dsl.CachingServiceReference<T>> program, Consumer<org.apache.aries.component.dsl.CachingServiceReference<T>> whenAddedNotGettable, Consumer<org.apache.aries.component.dsl.CachingServiceReference<T>> whenLeavingNotGettable, org.slf4j.Logger log)
-
service
public static <T> org.apache.aries.component.dsl.OSGi<T> service(org.apache.aries.component.dsl.CachingServiceReference<T> immutableServiceReference)
-
-