org.apache.camel.core.osgi.utils
Class BundleContextUtils

java.lang.Object
  extended by org.apache.camel.core.osgi.utils.BundleContextUtils

public final class BundleContextUtils
extends Object

Helper class


Method Summary
static Map<String,Properties> findComponents(org.osgi.framework.BundleContext bundleContext, org.apache.camel.CamelContext camelContext)
          Finds the components available on the bundle context and camel context
static org.osgi.framework.BundleContext getBundleContext(Class<?> clazz)
          Retrieve the BundleContext that the given class has been loaded from.
static String getComponentDocumentation(org.osgi.framework.BundleContext bundleContext, org.apache.camel.CamelContext camelContext, String componentName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getBundleContext

public static org.osgi.framework.BundleContext getBundleContext(Class<?> clazz)
Retrieve the BundleContext that the given class has been loaded from.

Parameters:
clazz - the class to find the bundle context from
Returns:
the bundle context or null if it can't be found

findComponents

public static Map<String,Properties> findComponents(org.osgi.framework.BundleContext bundleContext,
                                                    org.apache.camel.CamelContext camelContext)
                                             throws IOException,
                                                    org.apache.camel.util.LoadPropertiesException
Finds the components available on the bundle context and camel context

Throws:
IOException
org.apache.camel.util.LoadPropertiesException

getComponentDocumentation

public static String getComponentDocumentation(org.osgi.framework.BundleContext bundleContext,
                                               org.apache.camel.CamelContext camelContext,
                                               String componentName)
                                        throws IOException
Throws:
IOException


Apache Camel