Eclipse Kura component

This documentation page covers the integration options of Camel with the Eclipse Kura M2M gateway.

KuraRouter activator

The easiest way to deploy Apache Camel routes into the Kura is to create an OSGi bundle containing the class extending org.apache.camel.kura.KuraRouter class:

Kura router starts its own OSGi-aware CamelContext. It means that for every class extending KuraRouter, there will be a dedicated CamelContext instance. Ideally we recommend to deploy one KuraRouter per OSGi bundle.

Deploying KuraRouter

Bundle containing your Kura router class should import the following bundles in the OSGi manifest:

Keep in mind that you don't have to import every Camel component bundle you plan to use in your routes, as Camel components are resolved as the services on the runtime level.

Before you deploy your router bundle, be sure that you have deployed (and started) the following Camel core bundles (using Kura GoGo shell)...

...and all the components you plan to use in your routes:

Then finally deploy your router bundle:

KuraRouter utilities 

 Kura router base class provides many useful utilities. This section explores each of those.

SLF4J logger

Kura uses SLF4J facade for logging purposes. Protected member log returns SLF4J logger instance associated with the given Kura router.

BundleContext

Protected member bundleContext returns bundle context associated with the given Kura router.

CamelContext

Protected member camelContext is the CamelContext associated with the given Kura router.

OSGi service resolver

OSGi service resolver (service(Class<T> serviceType)) can be used to easily retrieve service by type from the OSGi bundle context.

See Also

© 2004-2014 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram