...
Supported architectural styles
Spark component can be used as a driver application deployed into an application server (or executed as a fat jar).
Spark component can also be submitted as a job directly into the Spark cluster.
While Spark component is primary designed to work as a long running job serving as an bridge between Spark cluster and the other endpoints, you can also use it as a fire-once short job.
KuraRouter activator
Bundles deployed to the Eclipse Kura are usually developed as bundle activators. So 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:
...
Code Block | ||
---|---|---|
| ||
public class MyKuraRouter extends KuraRouter {
@Override
public void configure() throws Exception {
log.info("Configuring Camel routes!");
...
}
} |
BundleContext
Protected member bundleContext
returns bundle context associated with the given Kura router.
Code Block | ||
---|---|---|
| ||
public class MyKuraRouter extends KuraRouter {
@Override
public void configure() throws Exception {
ServiceReference<MyService> serviceRef = bundleContext.getServiceReference(LogService.class.getName());
MyService myService = bundleContext.getService(serviceRef);
...
}
} |
CamelContext
Protected member camelContext
is the CamelContext
associated with the given Kura router.
...