THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
public class MyKuraRouter extends KuraRouter { @Override public void configure() throws Exception { camelContext.getStatus(); ... } } |
ProducerTemplate
Protected member producerTemplate
is the ProducerTemplate
instance associated with the given Camel context.
Code Block | ||
---|---|---|
| ||
public class MyKuraRouter extends KuraRouter {
@Override
public void configure() throws Exception {
producerTemplate.sendBody("jms:temperature", 22.0);
...
}
} |
ConsumerTemplate
Protected member consumerTemplate
is the ConsumerTemplate
instance associated with the given Camel context.
Code Block | ||
---|---|---|
| ||
public class MyKuraRouter extends KuraRouter {
@Override
public void configure() throws Exception {
double currentTemperature = producerTemplate.receiveBody("jms:temperature", Double.class);
...
}
} |
OSGi service resolver
OSGi service resolver (service(Class<T> serviceType)
) can be used to easily retrieve service by type from the OSGi bundle context.
...