org.eclipse.gemini.blueprint.compendium.internal.cm
Class CMUtils
java.lang.Object
org.eclipse.gemini.blueprint.compendium.internal.cm.CMUtils
public abstract class CMUtils
- extends Object
Utility class for the Configuration Admin package.
- Author:
- Costin Leau
Method Summary |
static void |
applyMapOntoInstance(Object instance,
Map<String,?> properties,
org.springframework.beans.factory.support.AbstractBeanFactory beanFactory)
Injects the properties from the given Map to the given object. |
static void |
bulkUpdate(org.eclipse.gemini.blueprint.compendium.internal.cm.UpdateCallback callback,
Collection<?> instances,
Map<?,?> properties)
|
static org.eclipse.gemini.blueprint.compendium.internal.cm.UpdateCallback |
createCallback(boolean autowireOnUpdate,
String methodName,
org.springframework.beans.factory.BeanFactory beanFactory)
|
static Map |
getConfiguration(org.osgi.framework.BundleContext bundleContext,
String pid,
long initTimeout)
Returns a map containing the Configuration Admin entry with given pid. |
static org.osgi.framework.ServiceRegistration |
registerManagedService(org.osgi.framework.BundleContext bundleContext,
org.osgi.service.cm.ManagedService listener,
String pid)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CMUtils
public CMUtils()
applyMapOntoInstance
public static void applyMapOntoInstance(Object instance,
Map<String,?> properties,
org.springframework.beans.factory.support.AbstractBeanFactory beanFactory)
- Injects the properties from the given Map to the given object. Additionally, a bean factory can be passed in for
copying property editors inside the injector.
- Parameters:
instance
- bean instance to configureproperties
- beanFactory
-
bulkUpdate
public static void bulkUpdate(org.eclipse.gemini.blueprint.compendium.internal.cm.UpdateCallback callback,
Collection<?> instances,
Map<?,?> properties)
createCallback
public static org.eclipse.gemini.blueprint.compendium.internal.cm.UpdateCallback createCallback(boolean autowireOnUpdate,
String methodName,
org.springframework.beans.factory.BeanFactory beanFactory)
getConfiguration
public static Map getConfiguration(org.osgi.framework.BundleContext bundleContext,
String pid,
long initTimeout)
throws IOException
- Returns a map containing the Configuration Admin entry with given pid. Waits until a non-null (initialized)
object is returned if initTimeout is bigger then 0.
- Parameters:
bundleContext
- pid
- initTimeout
-
- Returns:
-
- Throws:
IOException
registerManagedService
public static org.osgi.framework.ServiceRegistration registerManagedService(org.osgi.framework.BundleContext bundleContext,
org.osgi.service.cm.ManagedService listener,
String pid)
Copyright © 2006-2013. All Rights Reserved.