@Override public void onInit(Route route) { super.onInit(route); this.route = route; }
@Override public void onInit(Route route) { super.onInit(route); this.route = route; }
@Override public void onInit(Route route) { super.onInit(route); this.route = route; }
@Override public void onInit(Route route) { super.onInit(route); this.route = route; }
@Override public synchronized void onInit(Route route) { super.onInit(route); LOGGER.info("Route managed by {}. Setting route {} AutoStartup flag to false.", getClass(), route.getId()); route.getRouteContext().getRoute().setAutoStartup("false"); stoppeddRoutes.add(route); this.refCount.retain(); startManagedRoutes(); }
@Override public void onInit(Route route) { super.onInit(route);
@Override public void onInit(Route route) { super.onInit(route); if (getMeterRegistry() == null) { setMeterRegistry(MicrometerUtils.getOrCreateMeterRegistry( route.getRouteContext().getCamelContext().getRegistry(), METRICS_REGISTRY_NAME)); } try { MicrometerRoutePolicyService registryService = route.getRouteContext().getCamelContext().hasService(MicrometerRoutePolicyService.class); if (registryService == null) { registryService = new MicrometerRoutePolicyService(); registryService.setMeterRegistry(getMeterRegistry()); registryService.setPrettyPrint(isPrettyPrint()); registryService.setDurationUnit(getDurationUnit()); registryService.setMatchingTags(Tags.of(SERVICE_NAME, MicrometerRoutePolicyService.class.getSimpleName())); route.getRouteContext().getCamelContext().addService(registryService); ServiceHelper.startService(registryService); } } catch (Exception e) { throw ObjectHelper.wrapRuntimeCamelException(e); } // create statistics holder // for now we record only all the timings of a complete exchange (responses) // we have in-flight / total statistics already from camel-core statistics = new MetricsStatistics(getMeterRegistry(), route, getNamingStrategy()); }