...
Code Block |
---|
|
public class MyKuraRouter extends KuraRouter {
@Override
public void configure() throws Exception {
MyService myService = service(MyService.class);
...
}
} |
KuraRouter activator callbacks
Kura router comes with the lifecycle callbacks that can be used to customize the way the Camel router works. For example to configure the CamelContext
instance associated with the router just before the former is started, override beforeStart
method of the KuraRouter
class:
Code Block |
---|
|
public class MyKuraRouter extends KuraRouter {
...
protected void beforeStart(CamelContext camelContext) {
OsgiDefaultCamelContext osgiContext = (OsgiCamelContext) camelContext;
osgiContext.setName("NameOfTheRouter");
}
} |
Include Page |
---|
| Endpoint See Also |
---|
| Endpoint See Also |
---|
|