|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.robokind.api.common.osgi.OSGiUtils
public class OSGiUtils
Utility methods for working with OSGi.
Constructor Summary | |
---|---|
OSGiUtils()
|
Method Summary | |
---|---|
static String |
createServiceFilter(Properties props)
Creates a filter string which matches all of the properties given. |
static String |
createServiceFilter(String key,
String val)
Creates a filter string which matches the key and value given |
static org.osgi.framework.BundleContext |
getBundleContext(Class clazz)
Returns the BundleContext associated with the given Class. |
static Boolean |
serviceExists(org.osgi.framework.BundleContext context,
Class[] classes,
String filter)
Checks the OSGi Service Registry for an existing Service matching the given filter String and one or more of the given Class names. |
static Boolean |
serviceExists(org.osgi.framework.BundleContext context,
String clazz,
String filter)
Checks the OSGi Service Registry for a Service with the given class and matching the given filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OSGiUtils()
Method Detail |
---|
public static org.osgi.framework.BundleContext getBundleContext(Class clazz)
clazz
- Class associated with a Bundle
public static String createServiceFilter(Properties props)
props
- Properties to match
public static String createServiceFilter(String key, String val)
key
- keyval
- value
public static Boolean serviceExists(org.osgi.framework.BundleContext context, String clazz, String filter)
context
- BundleContext to useclazz
- Class name to matchfilter
- OSGi Service filter String
public static Boolean serviceExists(org.osgi.framework.BundleContext context, Class[] classes, String filter)
context
- BundleContext to useclasses
- one or more of the classes must be matchedfilter
- OSGi Service filter String to match
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |