public void afterConfigure()

in camel-k-cron/impl/src/main/java/org/apache/camel/k/cron/CronSourceLoaderInterceptor.java [73:97]


    public void afterConfigure(RouteBuilder builder) {
        if (ObjectHelper.isEmpty(overridableComponents)) {
            return;
        }

        final CamelContext context = runtime.getCamelContext();
        final String[] components = overridableComponents.split(",", -1);

        for (RouteDefinition def : builder.getRouteCollection().getRoutes()) {
            String uri = def.getInput() != null ? def.getInput().getUri() : null;
            if (shouldBeOverridden(uri, components)) {
                def.getInput().setUri(timerUri);

                //
                // Don't install the shutdown strategy more than once.
                //
                if (context.getManagementStrategy().getEventNotifiers().stream().noneMatch(CronShutdownStrategy.class::isInstance)) {
                    CronShutdownStrategy strategy = new CronShutdownStrategy(runtime);
                    ServiceHelper.startService(strategy);

                    context.getManagementStrategy().addEventNotifier(strategy);
                }
            }
        }
    }