THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||
---|---|---|
| ||
void onContextStarting(@Observes CamelContextStartingEvent event) { // Called before the default Camel context is about to start } |
As of Camel 2.18, it is possible to observe events for a particular route (RouteAddedEvent
, RouteStartedEvent
, RouteStoppedEvent
and RouteRemovedEvent
) should it have an explicit defined, e.g.:
Code Block | ||
---|---|---|
| ||
from("...").routeId("foo").to("...");
void onRouteStarted(@Observes @Named("foo") RouteStartedEvent event) {
// Called after the route "foo" has started
} |
When multiple Camel contexts exist in the CDI container, the Camel context bean qualifiers, like @ContextName
, can be used to refine the observer method resolution to a particular Camel context as specified in observer resolution, e.g.:
...