|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.camel.service.impl.CamelService
public class CamelService
Camel service.
| Constructor Summary | |
|---|---|
CamelService(org.osgi.framework.BundleContext context)
Constructor, needed to get the bundle context. |
|
| Method Summary | |
|---|---|
void |
addComponent(String componentName,
org.apache.camel.Component component,
String camelContextName)
Add a component on the given camel context. |
void |
addRegistry(InputStream input,
String camelContextName)
Add values to the registry component. |
void |
addRoutes(org.apache.camel.builder.RouteBuilder builder,
String camelContextName)
Add a Route to the given context, by providing a
RouteBuilder |
org.apache.camel.CamelContext |
getCamelContext(String name)
Get an instance of Camel. |
List<String> |
getContextNames()
Get the names of Camel contexts managed by the service. |
org.apache.camel.ProducerTemplate |
getProducerTemplate(String camelContextName)
Get a producer template for the given camel context. |
List<org.apache.camel.model.RouteDefinition> |
getRouteDefinitions(String camelContextName)
Get the list of existing routes. |
org.apache.camel.impl.SimpleRegistry |
getSimpleRegistryOfCamelContext(String name)
Get a simple registry instance of Camel context. |
void |
removeRegistry(InputStream input,
String camelContextName)
Remove entries from the registry component. |
void |
start()
Initializes the service. |
org.apache.camel.CamelContext |
startAndGetNewContext(org.osgi.framework.BundleContext bundleContext)
Start a new camel context using a given OSGi BundleContext and return context. |
String |
startNewContext(org.osgi.framework.BundleContext bundleContext)
Start a new camel context using a given OSGi BundleContext and return camel context name. |
void |
stop()
Stops all Camel contexts. |
void |
stop(String name)
Stop an instance of Camel. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CamelService(org.osgi.framework.BundleContext context)
context - the bundle context.| Method Detail |
|---|
public void start()
public void stop()
public List<String> getContextNames()
getContextNames in interface ICamelService
public String startNewContext(org.osgi.framework.BundleContext bundleContext)
throws Exception
startNewContext in interface ICamelServicebundleContext - OSGi bundle context to use.
Exception - If starting the context fails.
public void stop(String name)
throws Exception
stop in interface ICamelServicename - the camel context name to stop.
Exception - If stopping any CAMEL console fails.public org.apache.camel.CamelContext getCamelContext(String name)
getCamelContext in interface ICamelServicename - the camel context name
public org.apache.camel.impl.SimpleRegistry getSimpleRegistryOfCamelContext(String name)
name - the camel context name
public org.apache.camel.CamelContext startAndGetNewContext(org.osgi.framework.BundleContext bundleContext)
throws Exception
startAndGetNewContext in interface ICamelServicebundleContext - OSGi bundle context to use.
Exception - If starting the context fails.
public void addRoutes(org.apache.camel.builder.RouteBuilder builder,
String camelContextName)
throws Exception
ICamelServiceRoute to the given context, by providing a
RouteBuilder
addRoutes in interface ICamelServicebuilder - the route to add.camelContextName - the camel context name on which the route has to
be set.
Exception - If adding route fails.public List<org.apache.camel.model.RouteDefinition> getRouteDefinitions(String camelContextName)
getRouteDefinitions in interface ICamelServicecamelContextName - the identifier of the camel context to check.
public org.apache.camel.ProducerTemplate getProducerTemplate(String camelContextName)
getProducerTemplate in interface ICamelServicecamelContextName - the camel context name on which the producer has
to be taken.
public void addRegistry(InputStream input,
String camelContextName)
throws Exception
addRegistry in interface ICamelServiceinput - the stream that contains the entries to add.camelContextName - the camel context name that contains the registry
to update.
Exception
public void removeRegistry(InputStream input,
String camelContextName)
removeRegistry in interface ICamelServiceinput - the input stream that contains all the entries to removecamelContextName - the camel context name to remove the entries on.
public void addComponent(String componentName,
org.apache.camel.Component component,
String camelContextName)
addComponent in interface ICamelServicecomponentName - the component name.component - the component.camelContextName - the camel name context.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||