001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.camel.spring; 018 019import java.util.ArrayList; 020import java.util.List; 021import java.util.Map; 022 023import javax.xml.bind.annotation.XmlAccessType; 024import javax.xml.bind.annotation.XmlAccessorType; 025import javax.xml.bind.annotation.XmlAttribute; 026import javax.xml.bind.annotation.XmlElement; 027import javax.xml.bind.annotation.XmlElements; 028import javax.xml.bind.annotation.XmlRootElement; 029import javax.xml.bind.annotation.XmlTransient; 030 031import org.apache.camel.CamelContext; 032import org.apache.camel.LoggingLevel; 033import org.apache.camel.RoutesBuilder; 034import org.apache.camel.RuntimeCamelException; 035import org.apache.camel.ShutdownRoute; 036import org.apache.camel.ShutdownRunningTask; 037import org.apache.camel.TypeConverterExists; 038import org.apache.camel.builder.RouteBuilder; 039import org.apache.camel.component.properties.PropertiesComponent; 040import org.apache.camel.core.xml.AbstractCamelContextFactoryBean; 041import org.apache.camel.core.xml.AbstractCamelFactoryBean; 042import org.apache.camel.core.xml.CamelJMXAgentDefinition; 043import org.apache.camel.core.xml.CamelPropertyPlaceholderDefinition; 044import org.apache.camel.core.xml.CamelProxyFactoryDefinition; 045import org.apache.camel.core.xml.CamelRouteControllerDefinition; 046import org.apache.camel.core.xml.CamelServiceExporterDefinition; 047import org.apache.camel.core.xml.CamelStreamCachingStrategyDefinition; 048import org.apache.camel.model.ContextScanDefinition; 049import org.apache.camel.model.FaultToleranceConfigurationDefinition; 050import org.apache.camel.model.GlobalOptionsDefinition; 051import org.apache.camel.model.HystrixConfigurationDefinition; 052import org.apache.camel.model.InterceptDefinition; 053import org.apache.camel.model.InterceptFromDefinition; 054import org.apache.camel.model.InterceptSendToEndpointDefinition; 055import org.apache.camel.model.OnCompletionDefinition; 056import org.apache.camel.model.OnExceptionDefinition; 057import org.apache.camel.model.PackageScanDefinition; 058import org.apache.camel.model.Resilience4jConfigurationDefinition; 059import org.apache.camel.model.RestContextRefDefinition; 060import org.apache.camel.model.RouteBuilderDefinition; 061import org.apache.camel.model.RouteContextRefDefinition; 062import org.apache.camel.model.RouteDefinition; 063import org.apache.camel.model.ThreadPoolProfileDefinition; 064import org.apache.camel.model.cloud.ServiceCallConfigurationDefinition; 065import org.apache.camel.model.dataformat.DataFormatsDefinition; 066import org.apache.camel.model.rest.RestConfigurationDefinition; 067import org.apache.camel.model.rest.RestDefinition; 068import org.apache.camel.model.transformer.TransformersDefinition; 069import org.apache.camel.model.validator.ValidatorsDefinition; 070import org.apache.camel.spi.Metadata; 071import org.apache.camel.spi.PackageScanFilter; 072import org.apache.camel.spi.Registry; 073import org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer; 074import org.apache.camel.spring.spi.XmlCamelContextConfigurer; 075import org.apache.camel.support.CamelContextHelper; 076import org.apache.camel.util.StopWatch; 077import org.slf4j.Logger; 078import org.slf4j.LoggerFactory; 079import org.springframework.beans.factory.DisposableBean; 080import org.springframework.beans.factory.FactoryBean; 081import org.springframework.beans.factory.InitializingBean; 082import org.springframework.beans.factory.config.BeanPostProcessor; 083import org.springframework.context.ApplicationContext; 084import org.springframework.context.ApplicationContextAware; 085import org.springframework.context.ApplicationListener; 086import org.springframework.context.Lifecycle; 087import org.springframework.context.Phased; 088import org.springframework.context.event.ContextRefreshedEvent; 089import org.springframework.core.Ordered; 090 091import static org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException; 092 093/** 094 * CamelContext using XML configuration. 095 */ 096@Metadata(label = "spring,configuration") 097@XmlRootElement(name = "camelContext") 098@XmlAccessorType(XmlAccessType.FIELD) 099public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<SpringCamelContext> 100 implements FactoryBean<SpringCamelContext>, InitializingBean, DisposableBean, ApplicationContextAware, Lifecycle, 101 Phased, ApplicationListener<ContextRefreshedEvent>, Ordered { 102 103 private static final Logger LOG = LoggerFactory.getLogger(CamelContextFactoryBean.class); 104 105 @XmlAttribute(name = "depends-on") @Metadata(displayName = "Depends On") 106 private String dependsOn; 107 @XmlAttribute 108 private String trace; 109 @XmlAttribute 110 private String backlogTrace; 111 @XmlAttribute 112 private String tracePattern; 113 @XmlAttribute 114 private String debug; 115 @XmlAttribute @Metadata(defaultValue = "false") 116 private String messageHistory; 117 @XmlAttribute @Metadata(defaultValue = "false") 118 private String logMask; 119 @XmlAttribute 120 private String logExhaustedMessageBody; 121 @XmlAttribute 122 private String streamCache; 123 @XmlAttribute 124 private String delayer; 125 @XmlAttribute 126 private String errorHandlerRef; 127 @XmlAttribute @Metadata(defaultValue = "true") 128 private String autoStartup; 129 @XmlAttribute @Metadata(defaultValue = "true") 130 private String shutdownEager; 131 @XmlAttribute @Metadata(displayName = "Use MDC Logging") 132 private String useMDCLogging; 133 @XmlAttribute @Metadata(displayName = "MDC Logging Keys Pattern") 134 private String mdcLoggingKeysPattern; 135 @XmlAttribute 136 private String useDataType; 137 @XmlAttribute 138 private String useBreadcrumb; 139 @XmlAttribute 140 private String allowUseOriginalMessage; 141 @XmlAttribute 142 private String caseInsensitiveHeaders; 143 @XmlAttribute 144 private String runtimeEndpointRegistryEnabled; 145 @XmlAttribute @Metadata(defaultValue = "#name#") 146 private String managementNamePattern; 147 @XmlAttribute @Metadata(defaultValue = "Camel (#camelId#) thread ##counter# - #name#") 148 private String threadNamePattern; 149 @XmlAttribute @Metadata(defaultValue = "Default") 150 private ShutdownRoute shutdownRoute; 151 @XmlAttribute @Metadata(defaultValue = "CompleteCurrentTaskOnly") 152 private ShutdownRunningTask shutdownRunningTask; 153 @XmlAttribute @Metadata(defaultValue = "true") 154 private String loadTypeConverters; 155 @XmlAttribute 156 private String typeConverterStatisticsEnabled; 157 @XmlAttribute 158 private String inflightRepositoryBrowseEnabled; 159 @XmlAttribute @Metadata(defaultValue = "Override") 160 private TypeConverterExists typeConverterExists; 161 @XmlAttribute @Metadata(defaultValue = "WARN") 162 private LoggingLevel typeConverterExistsLoggingLevel; 163 @XmlElement(name = "globalOptions") 164 private GlobalOptionsDefinition globalOptions; 165 @XmlElement(name = "propertyPlaceholder", type = CamelPropertyPlaceholderDefinition.class) 166 private CamelPropertyPlaceholderDefinition camelPropertyPlaceholder; 167 @XmlElement(name = "package") 168 private String[] packages = {}; 169 @XmlElement(name = "packageScan", type = PackageScanDefinition.class) 170 private PackageScanDefinition packageScan; 171 @XmlElement(name = "contextScan", type = ContextScanDefinition.class) 172 private ContextScanDefinition contextScan; 173 @XmlElement(name = "streamCaching", type = CamelStreamCachingStrategyDefinition.class) 174 private CamelStreamCachingStrategyDefinition camelStreamCachingStrategy; 175 @XmlElement(name = "jmxAgent", type = CamelJMXAgentDefinition.class) @Metadata(displayName = "JMX Agent") 176 private CamelJMXAgentDefinition camelJMXAgent; 177 @XmlElement(name = "routeController", type = CamelRouteControllerDefinition.class) 178 private CamelRouteControllerDefinition camelRouteController; 179 @XmlElements({ 180 @XmlElement(name = "template", type = CamelProducerTemplateFactoryBean.class), 181 @XmlElement(name = "fluentTemplate", type = CamelFluentProducerTemplateFactoryBean.class), 182 @XmlElement(name = "consumerTemplate", type = CamelConsumerTemplateFactoryBean.class)}) 183 private List<AbstractCamelFactoryBean<?>> beansFactory; 184 @XmlElements({ 185 @XmlElement(name = "proxy", type = CamelProxyFactoryDefinition.class), 186 @XmlElement(name = "export", type = CamelServiceExporterDefinition.class), 187 @XmlElement(name = "errorHandler", type = ErrorHandlerDefinition.class) }) 188 private List<?> beans; 189 @XmlElement(name = "defaultServiceCallConfiguration") 190 private ServiceCallConfigurationDefinition defaultServiceCallConfiguration; 191 @XmlElement(name = "serviceCallConfiguration", type = ServiceCallConfigurationDefinition.class) 192 private List<ServiceCallConfigurationDefinition> serviceCallConfigurations; 193 @XmlElement(name = "defaultHystrixConfiguration") 194 private HystrixConfigurationDefinition defaultHystrixConfiguration; 195 @XmlElement(name = "hystrixConfiguration", type = HystrixConfigurationDefinition.class) 196 private List<HystrixConfigurationDefinition> hystrixConfigurations; 197 @XmlElement(name = "defaultResilience4jConfiguration") 198 private Resilience4jConfigurationDefinition defaultResilience4jConfiguration; 199 @XmlElement(name = "resilience4jConfiguration", type = Resilience4jConfigurationDefinition.class) 200 private List<Resilience4jConfigurationDefinition> resilience4jConfigurations; 201 @XmlElement(name = "defaultFaultToleranceConfiguration") 202 private FaultToleranceConfigurationDefinition defaultFaultToleranceConfiguration; 203 @XmlElement(name = "faultToleranceConfiguration", type = Resilience4jConfigurationDefinition.class) 204 private List<FaultToleranceConfigurationDefinition> faultToleranceConfigurations; 205 @XmlElement(name = "routeBuilder") 206 private List<RouteBuilderDefinition> builderRefs = new ArrayList<>(); 207 @XmlElement(name = "routeContextRef") 208 private List<RouteContextRefDefinition> routeRefs = new ArrayList<>(); 209 @XmlElement(name = "restContextRef") 210 private List<RestContextRefDefinition> restRefs = new ArrayList<>(); 211 @XmlElement(name = "threadPoolProfile") 212 private List<ThreadPoolProfileDefinition> threadPoolProfiles; 213 @XmlElement(name = "threadPool") 214 private List<CamelThreadPoolFactoryBean> threadPools; 215 @XmlElement(name = "endpoint") 216 private List<CamelEndpointFactoryBean> endpoints; 217 @XmlElement(name = "dataFormats") 218 private DataFormatsDefinition dataFormats; 219 @XmlElement(name = "transformers") 220 private TransformersDefinition transformers; 221 @XmlElement(name = "validators") 222 private ValidatorsDefinition validators; 223 @XmlElement(name = "redeliveryPolicyProfile") 224 private List<CamelRedeliveryPolicyFactoryBean> redeliveryPolicies; 225 @XmlElement(name = "onException") 226 private List<OnExceptionDefinition> onExceptions = new ArrayList<>(); 227 @XmlElement(name = "onCompletion") 228 private List<OnCompletionDefinition> onCompletions = new ArrayList<>(); 229 @XmlElement(name = "intercept") 230 private List<InterceptDefinition> intercepts = new ArrayList<>(); 231 @XmlElement(name = "interceptFrom") 232 private List<InterceptFromDefinition> interceptFroms = new ArrayList<>(); 233 @XmlElement(name = "interceptSendToEndpoint") 234 private List<InterceptSendToEndpointDefinition> interceptSendToEndpoints = new ArrayList<>(); 235 @XmlElement(name = "restConfiguration") 236 private RestConfigurationDefinition restConfiguration; 237 @XmlElement(name = "rest") 238 private List<RestDefinition> rests = new ArrayList<>(); 239 @XmlElement(name = "route") 240 private List<RouteDefinition> routes = new ArrayList<>(); 241 @XmlTransient 242 private SpringCamelContext context; 243 @XmlTransient 244 private ClassLoader contextClassLoaderOnStart; 245 @XmlTransient 246 private ApplicationContext applicationContext; 247 @XmlTransient 248 private BeanPostProcessor beanPostProcessor; 249 @XmlTransient 250 private boolean implicitId; 251 252 @Override 253 public Class<SpringCamelContext> getObjectType() { 254 return SpringCamelContext.class; 255 } 256 257 @Override 258 protected <S> S getBeanForType(Class<S> clazz) { 259 S bean = null; 260 String[] names = getApplicationContext().getBeanNamesForType(clazz, true, true); 261 if (names.length == 1) { 262 bean = getApplicationContext().getBean(names[0], clazz); 263 } 264 if (bean == null) { 265 ApplicationContext parentContext = getApplicationContext().getParent(); 266 if (parentContext != null) { 267 names = parentContext.getBeanNamesForType(clazz, true, true); 268 if (names.length == 1) { 269 bean = parentContext.getBean(names[0], clazz); 270 } 271 } 272 } 273 return bean; 274 } 275 276 @Override 277 protected void findRouteBuildersByPackageScan(String[] packages, PackageScanFilter filter, List<RoutesBuilder> builders) throws Exception { 278 // add filter to class resolver which then will filter 279 getContext().getPackageScanClassResolver().addFilter(filter); 280 281 PackageScanRouteBuilderFinder finder = new PackageScanRouteBuilderFinder(getContext(), packages, getContextClassLoaderOnStart(), 282 getBeanPostProcessor(), getContext().getPackageScanClassResolver()); 283 finder.appendBuilders(builders); 284 285 // and remove the filter 286 getContext().getPackageScanClassResolver().removeFilter(filter); 287 } 288 289 @Override 290 protected void findRouteBuildersByContextScan(PackageScanFilter filter, boolean includeNonSingletons, List<RoutesBuilder> builders) throws Exception { 291 ContextScanRouteBuilderFinder finder = new ContextScanRouteBuilderFinder(getContext(), filter, includeNonSingletons); 292 finder.appendBuilders(builders); 293 } 294 295 @Override 296 protected void initBeanPostProcessor(SpringCamelContext context) { 297 if (beanPostProcessor != null) { 298 if (beanPostProcessor instanceof ApplicationContextAware) { 299 ((ApplicationContextAware) beanPostProcessor).setApplicationContext(applicationContext); 300 } 301 if (beanPostProcessor instanceof CamelBeanPostProcessor) { 302 ((CamelBeanPostProcessor) beanPostProcessor).setCamelContext(getContext()); 303 } 304 // register the bean post processor on camel context 305 if (beanPostProcessor instanceof org.apache.camel.spi.CamelBeanPostProcessor) { 306 context.setBeanPostProcessor((org.apache.camel.spi.CamelBeanPostProcessor) beanPostProcessor); 307 } 308 } 309 } 310 311 @Override 312 protected void postProcessBeforeInit(RouteBuilder builder) { 313 if (beanPostProcessor != null) { 314 // Inject the annotated resource 315 beanPostProcessor.postProcessBeforeInitialization(builder, builder.toString()); 316 } 317 } 318 319 @Override 320 public void afterPropertiesSet() throws Exception { 321 StopWatch watch = new StopWatch(); 322 323 super.afterPropertiesSet(); 324 325 Boolean shutdownEager = CamelContextHelper.parseBoolean(getContext(), getShutdownEager()); 326 if (shutdownEager != null) { 327 LOG.debug("Using shutdownEager: {}", shutdownEager); 328 getContext().setShutdownEager(shutdownEager); 329 } 330 331 LOG.debug("afterPropertiesSet() took {} millis", watch.taken()); 332 } 333 334 @Override 335 protected void initCustomRegistry(SpringCamelContext context) { 336 Registry registry = getBeanForType(Registry.class); 337 if (registry != null) { 338 LOG.info("Using custom Registry: {}", registry); 339 context.setRegistry(registry); 340 } 341 } 342 343 @Override 344 protected void initPropertyPlaceholder() throws Exception { 345 super.initPropertyPlaceholder(); 346 347 Map<String, BridgePropertyPlaceholderConfigurer> beans = applicationContext.getBeansOfType(BridgePropertyPlaceholderConfigurer.class); 348 if (beans.size() == 1) { 349 // setup properties component that uses this beans 350 BridgePropertyPlaceholderConfigurer configurer = beans.values().iterator().next(); 351 String id = beans.keySet().iterator().next(); 352 LOG.info("Bridging Camel and Spring property placeholder configurer with id: {}", id); 353 354 // get properties component 355 PropertiesComponent pc = (PropertiesComponent) getContext().getPropertiesComponent(); 356 // use the spring system properties mode which has a different value than Camel may have 357 pc.setSystemPropertiesMode(configurer.getSystemPropertiesMode()); 358 359 // replace existing resolver with us 360 configurer.setParser(pc.getPropertiesParser()); 361 // use the bridge to handle the resolve and parsing 362 pc.setPropertiesParser(configurer); 363 // use the bridge as property source 364 pc.addPropertiesSource(configurer); 365 366 } else if (beans.size() > 1) { 367 LOG.warn("Cannot bridge Camel and Spring property placeholders, as exact only 1 bean of type BridgePropertyPlaceholderConfigurer" 368 + " must be defined, was {} beans defined.", beans.size()); 369 } 370 } 371 372 @Override 373 public void start() { 374 try { 375 setupRoutes(); 376 } catch (Exception e) { 377 throw wrapRuntimeCamelException(e); 378 } 379 380 // when the routes are setup we need to start the Camel context 381 context.start(); 382 } 383 384 @Override 385 public void stop() { 386 if (context != null) { 387 context.stop(); 388 } 389 } 390 391 @Override 392 public boolean isRunning() { 393 return context != null && context.isRunning(); 394 } 395 396 @Override 397 public int getPhase() { 398 // the factory starts the context from 399 // onApplicationEvent(ContextRefreshedEvent) so the phase we're 400 // in only influences when the context is to be stopped, and 401 // we want the CamelContext to be first in line to get stopped 402 // if we wanted the phase to be considered while starting, we 403 // would need to implement SmartLifecycle (see 404 // DefaultLifecycleProcessor::startBeans) 405 // we use LOWEST_PRECEDENCE here as this is taken into account 406 // only when stopping and then in reversed order 407 return LOWEST_PRECEDENCE - 1; 408 } 409 410 @Override 411 public int getOrder() { 412 // CamelContextFactoryBean implements Ordered so that it's the 413 // second to last in ApplicationListener to receive events, 414 // SpringCamelContext should be the last one, this is important 415 // for startup as we want all resources to be ready and all 416 // routes added to the context (see setupRoutes() and 417 // org.apache.camel.spring.boot.RoutesCollector) 418 return LOWEST_PRECEDENCE - 1; 419 } 420 421 @Override 422 public void onApplicationEvent(final ContextRefreshedEvent event) { 423 // start the CamelContext when the Spring ApplicationContext is 424 // done initializing, as the last step in ApplicationContext 425 // being started/refreshed, there could be a race condition with 426 // other ApplicationListeners that react to 427 // ContextRefreshedEvent but this is the best that we can do 428 start(); 429 } 430 431 // Properties 432 // ------------------------------------------------------------------------- 433 434 public ApplicationContext getApplicationContext() { 435 if (applicationContext == null) { 436 throw new IllegalArgumentException("No applicationContext has been injected!"); 437 } 438 return applicationContext; 439 } 440 441 @Override 442 public void setApplicationContext(ApplicationContext applicationContext) { 443 this.applicationContext = applicationContext; 444 } 445 446 public void setBeanPostProcessor(BeanPostProcessor postProcessor) { 447 this.beanPostProcessor = postProcessor; 448 } 449 450 public BeanPostProcessor getBeanPostProcessor() { 451 return beanPostProcessor; 452 } 453 454 // Implementation methods 455 // ------------------------------------------------------------------------- 456 457 /** 458 * Create the context 459 */ 460 protected SpringCamelContext createContext() { 461 SpringCamelContext ctx = newCamelContext(); 462 ctx.setName(getId()); 463 464 return ctx; 465 } 466 467 /** 468 * Apply additional configuration to the context 469 */ 470 protected void configure(SpringCamelContext ctx) { 471 try { 472 // allow any custom configuration, such as when running in camel-spring-boot 473 if (applicationContext.containsBean("xmlCamelContextConfigurer")) { 474 XmlCamelContextConfigurer configurer = applicationContext.getBean("xmlCamelContextConfigurer", XmlCamelContextConfigurer.class); 475 if (configurer != null) { 476 configurer.configure(applicationContext, ctx); 477 } 478 } 479 } catch (Exception e) { 480 // error during configuration 481 throw RuntimeCamelException.wrapRuntimeCamelException(e); 482 } 483 } 484 485 protected SpringCamelContext newCamelContext() { 486 return new SpringCamelContext(getApplicationContext()); 487 } 488 489 @Override 490 public SpringCamelContext getContext(boolean create) { 491 if (context == null && create) { 492 context = createContext(); 493 configure(context); 494 context.build(); 495 } 496 return context; 497 } 498 499 public void setContext(SpringCamelContext context) { 500 this.context = context; 501 } 502 503 @Override 504 public List<RouteDefinition> getRoutes() { 505 return routes; 506 } 507 508 /** 509 * Contains the Camel routes 510 */ 511 @Override 512 public void setRoutes(List<RouteDefinition> routes) { 513 this.routes = routes; 514 } 515 516 @Override 517 public List<RestDefinition> getRests() { 518 return rests; 519 } 520 521 /** 522 * Contains the rest services defined using the rest-dsl 523 */ 524 @Override 525 public void setRests(List<RestDefinition> rests) { 526 this.rests = rests; 527 } 528 529 @Override 530 public RestConfigurationDefinition getRestConfiguration() { 531 return restConfiguration; 532 } 533 534 /** 535 * Configuration for rest-dsl 536 */ 537 public void setRestConfiguration(RestConfigurationDefinition restConfiguration) { 538 this.restConfiguration = restConfiguration; 539 } 540 541 @Override 542 public List<CamelEndpointFactoryBean> getEndpoints() { 543 return endpoints; 544 } 545 546 /** 547 * Configuration of endpoints 548 */ 549 public void setEndpoints(List<CamelEndpointFactoryBean> endpoints) { 550 this.endpoints = endpoints; 551 } 552 553 @Override 554 public List<CamelRedeliveryPolicyFactoryBean> getRedeliveryPolicies() { 555 return redeliveryPolicies; 556 } 557 558 @Override 559 public List<InterceptDefinition> getIntercepts() { 560 return intercepts; 561 } 562 563 /** 564 * Configuration of interceptors. 565 */ 566 public void setIntercepts(List<InterceptDefinition> intercepts) { 567 this.intercepts = intercepts; 568 } 569 570 @Override 571 public List<InterceptFromDefinition> getInterceptFroms() { 572 return interceptFroms; 573 } 574 575 /** 576 * Configuration of interceptors that triggers from the beginning of routes. 577 */ 578 public void setInterceptFroms(List<InterceptFromDefinition> interceptFroms) { 579 this.interceptFroms = interceptFroms; 580 } 581 582 @Override 583 public List<InterceptSendToEndpointDefinition> getInterceptSendToEndpoints() { 584 return interceptSendToEndpoints; 585 } 586 587 /** 588 * Configuration of interceptors that triggers sending messages to endpoints. 589 */ 590 public void setInterceptSendToEndpoints(List<InterceptSendToEndpointDefinition> interceptSendToEndpoints) { 591 this.interceptSendToEndpoints = interceptSendToEndpoints; 592 } 593 594 @Override 595 public GlobalOptionsDefinition getGlobalOptions() { 596 return globalOptions; 597 } 598 599 /** 600 * Configuration of CamelContext properties such as limit of debug logging 601 * and other general options. 602 */ 603 public void setGlobalOptions(GlobalOptionsDefinition globalOptions) { 604 this.globalOptions = globalOptions; 605 } 606 607 @Override 608 public String[] getPackages() { 609 return packages; 610 } 611 612 /** 613 * Sets the package names to be recursively searched for Java classes which 614 * extend {@link org.apache.camel.builder.RouteBuilder} to be auto-wired up to the 615 * {@link CamelContext} as a route. Note that classes are excluded if 616 * they are specifically configured in the spring.xml 617 * <p/> 618 * A more advanced configuration can be done using {@link #setPackageScan(org.apache.camel.model.PackageScanDefinition)} 619 * 620 * @param packages the package names which are recursively searched 621 * @see #setPackageScan(org.apache.camel.model.PackageScanDefinition) 622 */ 623 public void setPackages(String[] packages) { 624 this.packages = packages; 625 } 626 627 @Override 628 public PackageScanDefinition getPackageScan() { 629 return packageScan; 630 } 631 632 /** 633 * Sets the package scanning information. Package scanning allows for the 634 * automatic discovery of certain camel classes at runtime for inclusion 635 * e.g. {@link org.apache.camel.builder.RouteBuilder} implementations 636 * 637 * @param packageScan the package scan 638 */ 639 @Override 640 public void setPackageScan(PackageScanDefinition packageScan) { 641 this.packageScan = packageScan; 642 } 643 644 @Override 645 public ContextScanDefinition getContextScan() { 646 return contextScan; 647 } 648 649 /** 650 * Sets the context scanning (eg Spring's ApplicationContext) information. 651 * Context scanning allows for the automatic discovery of Camel routes runtime for inclusion 652 * e.g. {@link org.apache.camel.builder.RouteBuilder} implementations 653 * 654 * @param contextScan the context scan 655 */ 656 @Override 657 public void setContextScan(ContextScanDefinition contextScan) { 658 this.contextScan = contextScan; 659 } 660 661 @Override 662 public CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder() { 663 return camelPropertyPlaceholder; 664 } 665 666 /** 667 * Configuration of property placeholder 668 */ 669 public void setCamelPropertyPlaceholder(CamelPropertyPlaceholderDefinition camelPropertyPlaceholder) { 670 this.camelPropertyPlaceholder = camelPropertyPlaceholder; 671 } 672 673 @Override 674 public CamelStreamCachingStrategyDefinition getCamelStreamCachingStrategy() { 675 return camelStreamCachingStrategy; 676 } 677 678 /** 679 * Configuration of stream caching. 680 */ 681 public void setCamelStreamCachingStrategy(CamelStreamCachingStrategyDefinition camelStreamCachingStrategy) { 682 this.camelStreamCachingStrategy = camelStreamCachingStrategy; 683 } 684 685 @Override 686 public CamelRouteControllerDefinition getCamelRouteController() { 687 return camelRouteController; 688 } 689 690 public void setCamelRouteController(CamelRouteControllerDefinition camelRouteController) { 691 this.camelRouteController = camelRouteController; 692 } 693 694 /** 695 * Configuration of JMX Agent. 696 */ 697 public void setCamelJMXAgent(CamelJMXAgentDefinition agent) { 698 camelJMXAgent = agent; 699 } 700 701 @Override 702 public String getTrace() { 703 return trace; 704 } 705 706 /** 707 * Sets whether tracing is enabled or not. 708 * 709 * To use tracing then this must be enabled on startup to be installed in the CamelContext. 710 */ 711 public void setTrace(String trace) { 712 this.trace = trace; 713 } 714 715 @Override 716 public String getBacklogTrace() { 717 return backlogTrace; 718 } 719 720 /** 721 * Sets whether backlog tracing is enabled or not. 722 * 723 * To use backlog tracing then this must be enabled on startup to be installed in the CamelContext. 724 */ 725 public void setBacklogTrace(String backlogTrace) { 726 this.backlogTrace = backlogTrace; 727 } 728 729 @Override 730 public String getDebug() { 731 return debug; 732 } 733 734 /** 735 * Sets whether debugging is enabled or not. 736 * 737 * To use debugging then this must be enabled on startup to be installed in the CamelContext. 738 */ 739 public void setDebug(String debug) { 740 this.debug = debug; 741 } 742 743 @Override 744 public String getTracePattern() { 745 return tracePattern; 746 } 747 748 /** 749 * Tracing pattern to match which node EIPs to trace. 750 * For example to match all To EIP nodes, use to*. 751 * The pattern matches by node and route id's 752 * Multiple patterns can be separated by comma. 753 */ 754 public void setTracePattern(String tracePattern) { 755 this.tracePattern = tracePattern; 756 } 757 758 @Override 759 public String getMessageHistory() { 760 return messageHistory; 761 } 762 763 /** 764 * Sets whether message history is enabled or not. 765 */ 766 public void setMessageHistory(String messageHistory) { 767 this.messageHistory = messageHistory; 768 } 769 770 @Override 771 public String getLogMask() { 772 return logMask; 773 } 774 775 /** 776 * Sets whether security mask for Logging is enabled or not. 777 */ 778 public void setLogMask(String logMask) { 779 this.logMask = logMask; 780 } 781 782 @Override 783 public String getLogExhaustedMessageBody() { 784 return logExhaustedMessageBody; 785 } 786 787 /** 788 * Sets whether to log exhausted message body with message history. 789 */ 790 public void setLogExhaustedMessageBody(String logExhaustedMessageBody) { 791 this.logExhaustedMessageBody = logExhaustedMessageBody; 792 } 793 794 @Override 795 public String getStreamCache() { 796 return streamCache; 797 } 798 799 /** 800 * Sets whether stream caching is enabled or not. 801 */ 802 public void setStreamCache(String streamCache) { 803 this.streamCache = streamCache; 804 } 805 806 @Override 807 public String getDelayer() { 808 return delayer; 809 } 810 811 /** 812 * Sets a delay value in millis that a message is delayed at every step it takes in the route path, 813 * slowing the process down to better observe what is occurring 814 */ 815 public void setDelayer(String delayer) { 816 this.delayer = delayer; 817 } 818 819 @Override 820 public String getAutoStartup() { 821 return autoStartup; 822 } 823 824 /** 825 * Sets whether the object should automatically start when Camel starts. 826 * <p/> 827 * <b>Important:</b> Currently only routes can be disabled, as {@link CamelContext}s are always started. 828 * <br/> 829 * <b>Note:</b> When setting auto startup <tt>false</tt> on {@link CamelContext} then that takes precedence 830 * and <i>no</i> routes is started. You would need to start {@link CamelContext} explicit using 831 * the {@link org.apache.camel.CamelContext#start()} method, to start the context, and then 832 * you would need to start the routes manually using {@link org.apache.camel.spi.RouteController#startRoute(String)}. 833 */ 834 public void setAutoStartup(String autoStartup) { 835 this.autoStartup = autoStartup; 836 } 837 838 public String getShutdownEager() { 839 return shutdownEager; 840 } 841 842 /** 843 * Whether to shutdown CamelContext eager when Spring is shutting down. 844 * This ensure a cleaner shutdown of Camel, as dependent bean's are not shutdown at this moment. 845 * The bean's will then be shutdown after camelContext. 846 */ 847 public void setShutdownEager(String shutdownEager) { 848 this.shutdownEager = shutdownEager; 849 } 850 851 @Override 852 public String getUseMDCLogging() { 853 return useMDCLogging; 854 } 855 856 /** 857 * Set whether <a href="http://www.slf4j.org/api/org/slf4j/MDC.html">MDC</a> is enabled. 858 */ 859 public void setUseMDCLogging(String useMDCLogging) { 860 this.useMDCLogging = useMDCLogging; 861 } 862 863 public String getMDCLoggingKeysPattern() { 864 return mdcLoggingKeysPattern; 865 } 866 867 /** 868 * Sets the pattern used for determine which custom MDC keys to propagate during message routing when 869 * the routing engine continues routing asynchronously for the given message. Setting this pattern to * will 870 * propagate all custom keys. Or setting the pattern to foo*,bar* will propagate any keys starting with 871 * either foo or bar. 872 * Notice that a set of standard Camel MDC keys are always propagated which starts with camel. as key name. 873 * 874 * The match rules are applied in this order (case insensitive): 875 * 876 * 1. exact match, returns true 877 * 2. wildcard match (pattern ends with a * and the name starts with the pattern), returns true 878 * 3. regular expression match, returns true 879 * 4. otherwise returns false 880 */ 881 public void setMDCLoggingKeysPattern(String mdcLoggingKeysPattern) { 882 this.mdcLoggingKeysPattern = mdcLoggingKeysPattern; 883 } 884 885 @Override 886 public String getUseDataType() { 887 return useDataType; 888 } 889 890 /** 891 * Whether to enable using data type on Camel messages. 892 * <p/> 893 * Data type are automatic turned on if: 894 * <ul> 895 * <li>one ore more routes has been explicit configured with input and output types</li> 896 * <li>when using rest-dsl with binding turned on</li> 897 * </ul> 898 * Otherwise data type is default off. 899 */ 900 public void setUseDataType(String useDataType) { 901 this.useDataType = useDataType; 902 } 903 904 @Override 905 public String getUseBreadcrumb() { 906 return useBreadcrumb; 907 } 908 909 /** 910 * Set whether breadcrumb is enabled. 911 */ 912 public void setUseBreadcrumb(String useBreadcrumb) { 913 this.useBreadcrumb = useBreadcrumb; 914 } 915 916 @Override 917 public String getAllowUseOriginalMessage() { 918 return allowUseOriginalMessage; 919 } 920 921 /** 922 * Sets whether to allow access to the original message from Camel's error handler, 923 * or from {@link org.apache.camel.spi.UnitOfWork#getOriginalInMessage()}. 924 * <p/> 925 * Turning this off can optimize performance, as defensive copy of the original message is not needed. 926 */ 927 public void setAllowUseOriginalMessage(String allowUseOriginalMessage) { 928 this.allowUseOriginalMessage = allowUseOriginalMessage; 929 } 930 931 @Override 932 public String getCaseInsensitiveHeaders() { 933 return caseInsensitiveHeaders; 934 } 935 936 /** 937 * Whether to use case sensitive or insensitive headers. 938 * 939 * Important: When using case sensitive (this is set to false). 940 * Then the map is case sensitive which means headers such as content-type and Content-Type are 941 * two different keys which can be a problem for some protocols such as HTTP based, which rely on case insensitive headers. 942 * However case sensitive implementations can yield faster performance. Therefore use case sensitive implementation with care. 943 * 944 * Default is true. 945 */ 946 public void setCaseInsensitiveHeaders(String caseInsensitiveHeaders) { 947 this.caseInsensitiveHeaders = caseInsensitiveHeaders; 948 } 949 950 @Override 951 public String getRuntimeEndpointRegistryEnabled() { 952 return runtimeEndpointRegistryEnabled; 953 } 954 955 /** 956 * Sets whether {@link org.apache.camel.spi.RuntimeEndpointRegistry} is enabled. 957 */ 958 public void setRuntimeEndpointRegistryEnabled(String runtimeEndpointRegistryEnabled) { 959 this.runtimeEndpointRegistryEnabled = runtimeEndpointRegistryEnabled; 960 } 961 962 @Override 963 public String getInflightRepositoryBrowseEnabled() { 964 return inflightRepositoryBrowseEnabled; 965 } 966 967 /** 968 * Sets whether the inflight repository should allow browsing each inflight exchange. 969 * 970 * This is by default disabled as there is a very slight performance overhead when enabled. 971 */ 972 public void setInflightRepositoryBrowseEnabled(String inflightRepositoryBrowseEnabled) { 973 this.inflightRepositoryBrowseEnabled = inflightRepositoryBrowseEnabled; 974 } 975 976 @Override 977 public String getManagementNamePattern() { 978 return managementNamePattern; 979 } 980 981 /** 982 * The naming pattern for creating the CamelContext management name. 983 */ 984 public void setManagementNamePattern(String managementNamePattern) { 985 this.managementNamePattern = managementNamePattern; 986 } 987 988 @Override 989 public String getThreadNamePattern() { 990 return threadNamePattern; 991 } 992 993 /** 994 * Sets the thread name pattern used for creating the full thread name. 995 * <p/> 996 * The default pattern is: <tt>Camel (#camelId#) thread ##counter# - #name#</tt> 997 * <p/> 998 * Where <tt>#camelId#</tt> is the name of the {@link org.apache.camel.CamelContext} 999 * <br/>and <tt>#counter#</tt> is a unique incrementing counter. 1000 * <br/>and <tt>#name#</tt> is the regular thread name. 1001 * <br/>You can also use <tt>#longName#</tt> is the long thread name which can includes endpoint parameters etc. 1002 */ 1003 public void setThreadNamePattern(String threadNamePattern) { 1004 this.threadNamePattern = threadNamePattern; 1005 } 1006 1007 @Override 1008 public String getLoadTypeConverters() { 1009 return loadTypeConverters; 1010 } 1011 1012 /** 1013 * Sets whether to load custom type converters by scanning classpath. 1014 * This can be turned off if you are only using Camel components 1015 * that does not provide type converters which is needed at runtime. 1016 * In such situations setting this option to false, can speedup starting 1017 * Camel. 1018 * 1019 * @param loadTypeConverters whether to load custom type converters. 1020 */ 1021 public void setLoadTypeConverters(String loadTypeConverters) { 1022 this.loadTypeConverters = loadTypeConverters; 1023 } 1024 1025 @Override 1026 public String getTypeConverterStatisticsEnabled() { 1027 return typeConverterStatisticsEnabled; 1028 } 1029 1030 /** 1031 * Sets whether or not type converter statistics is enabled. 1032 * <p/> 1033 * By default the type converter utilization statistics is disabled. 1034 * <b>Notice:</b> If enabled then there is a slight performance impact under very heavy load. 1035 * <p/> 1036 * You can enable/disable the statistics at runtime using the 1037 * {@link org.apache.camel.spi.TypeConverterRegistry#getStatistics()#setTypeConverterStatisticsEnabled(Boolean)} method, 1038 * or from JMX on the {@link org.apache.camel.api.management.mbean.ManagedTypeConverterRegistryMBean} mbean. 1039 */ 1040 public void setTypeConverterStatisticsEnabled(String typeConverterStatisticsEnabled) { 1041 this.typeConverterStatisticsEnabled = typeConverterStatisticsEnabled; 1042 } 1043 1044 @Override 1045 public TypeConverterExists getTypeConverterExists() { 1046 return typeConverterExists; 1047 } 1048 1049 /** 1050 * What should happen when attempting to add a duplicate type converter. 1051 * <p/> 1052 * The default behavior is to override the existing. 1053 */ 1054 public void setTypeConverterExists(TypeConverterExists typeConverterExists) { 1055 this.typeConverterExists = typeConverterExists; 1056 } 1057 1058 @Override 1059 public LoggingLevel getTypeConverterExistsLoggingLevel() { 1060 return typeConverterExistsLoggingLevel; 1061 } 1062 1063 /** 1064 * The logging level to use when logging that a type converter already exists when attempting to add a duplicate type converter. 1065 * <p/> 1066 * The default logging level is <tt>WARN</tt> 1067 */ 1068 public void setTypeConverterExistsLoggingLevel(LoggingLevel typeConverterExistsLoggingLevel) { 1069 this.typeConverterExistsLoggingLevel = typeConverterExistsLoggingLevel; 1070 } 1071 1072 @Override 1073 public CamelJMXAgentDefinition getCamelJMXAgent() { 1074 return camelJMXAgent; 1075 } 1076 1077 @Override 1078 public List<RouteBuilderDefinition> getBuilderRefs() { 1079 return builderRefs; 1080 } 1081 1082 /** 1083 * Refers to Java {@link RouteBuilder} instances to include as routes in this CamelContext. 1084 */ 1085 public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs) { 1086 this.builderRefs = builderRefs; 1087 } 1088 1089 @Override 1090 public List<RouteContextRefDefinition> getRouteRefs() { 1091 return routeRefs; 1092 } 1093 1094 /** 1095 * Refers to XML routes to include as routes in this CamelContext. 1096 */ 1097 public void setRouteRefs(List<RouteContextRefDefinition> routeRefs) { 1098 this.routeRefs = routeRefs; 1099 } 1100 1101 @Override 1102 public List<RestContextRefDefinition> getRestRefs() { 1103 return restRefs; 1104 } 1105 1106 /** 1107 * Refers to XML rest-dsl to include as REST services in this CamelContext. 1108 */ 1109 public void setRestRefs(List<RestContextRefDefinition> restRefs) { 1110 this.restRefs = restRefs; 1111 } 1112 1113 @Override 1114 public String getErrorHandlerRef() { 1115 return errorHandlerRef; 1116 } 1117 1118 /** 1119 * Sets the name of the error handler object used to default the error handling strategy 1120 */ 1121 public void setErrorHandlerRef(String errorHandlerRef) { 1122 this.errorHandlerRef = errorHandlerRef; 1123 } 1124 1125 /** 1126 * Configuration of data formats. 1127 */ 1128 public void setDataFormats(DataFormatsDefinition dataFormats) { 1129 this.dataFormats = dataFormats; 1130 } 1131 1132 @Override 1133 public DataFormatsDefinition getDataFormats() { 1134 return dataFormats; 1135 } 1136 1137 /** 1138 * Configuration of transformers. 1139 */ 1140 public void setTransformers(TransformersDefinition transformers) { 1141 this.transformers = transformers; 1142 } 1143 1144 @Override 1145 public TransformersDefinition getTransformers() { 1146 return transformers; 1147 } 1148 1149 /** 1150 * Configuration of validators. 1151 */ 1152 public void setValidators(ValidatorsDefinition validators) { 1153 this.validators = validators; 1154 } 1155 1156 @Override 1157 public ValidatorsDefinition getValidators() { 1158 return validators; 1159 } 1160 1161 /** 1162 * Configuration of redelivery settings. 1163 */ 1164 public void setRedeliveryPolicies(List<CamelRedeliveryPolicyFactoryBean> redeliveryPolicies) { 1165 this.redeliveryPolicies = redeliveryPolicies; 1166 } 1167 1168 @Override 1169 public List<AbstractCamelFactoryBean<?>> getBeansFactory() { 1170 return beansFactory; 1171 } 1172 1173 /** 1174 * Miscellaneous configurations 1175 */ 1176 public void setBeansFactory(List<AbstractCamelFactoryBean<?>> beansFactory) { 1177 this.beansFactory = beansFactory; 1178 } 1179 1180 @Override 1181 public List<?> getBeans() { 1182 return beans; 1183 } 1184 1185 /** 1186 * Miscellaneous configurations 1187 */ 1188 public void setBeans(List<?> beans) { 1189 this.beans = beans; 1190 } 1191 1192 @Override 1193 public ServiceCallConfigurationDefinition getDefaultServiceCallConfiguration() { 1194 return defaultServiceCallConfiguration; 1195 } 1196 1197 /** 1198 * ServiceCall EIP default configuration 1199 */ 1200 public void setDefaultServiceCallConfiguration(ServiceCallConfigurationDefinition defaultServiceCallConfiguration) { 1201 this.defaultServiceCallConfiguration = defaultServiceCallConfiguration; 1202 } 1203 1204 @Override 1205 public List<ServiceCallConfigurationDefinition> getServiceCallConfigurations() { 1206 return serviceCallConfigurations; 1207 } 1208 1209 /** 1210 * ServiceCall EIP configurations 1211 */ 1212 public void setServiceCallConfigurations(List<ServiceCallConfigurationDefinition> serviceCallConfigurations) { 1213 this.serviceCallConfigurations = serviceCallConfigurations; 1214 } 1215 1216 @Override 1217 public List<HystrixConfigurationDefinition> getHystrixConfigurations() { 1218 return hystrixConfigurations; 1219 } 1220 1221 @Override 1222 public HystrixConfigurationDefinition getDefaultHystrixConfiguration() { 1223 return defaultHystrixConfiguration; 1224 } 1225 1226 /** 1227 * Hystrix EIP default configuration 1228 */ 1229 public void setDefaultHystrixConfiguration(HystrixConfigurationDefinition defaultHystrixConfiguration) { 1230 this.defaultHystrixConfiguration = defaultHystrixConfiguration; 1231 } 1232 1233 /** 1234 * Hystrix Circuit Breaker EIP configurations 1235 */ 1236 public void setHystrixConfigurations(List<HystrixConfigurationDefinition> hystrixConfigurations) { 1237 this.hystrixConfigurations = hystrixConfigurations; 1238 } 1239 1240 @Override 1241 public Resilience4jConfigurationDefinition getDefaultResilience4jConfiguration() { 1242 return defaultResilience4jConfiguration; 1243 } 1244 1245 /** 1246 * Resilience4j EIP default configuration 1247 */ 1248 public void setDefaultResilience4jConfiguration(Resilience4jConfigurationDefinition defaultResilience4jConfiguration) { 1249 this.defaultResilience4jConfiguration = defaultResilience4jConfiguration; 1250 } 1251 1252 @Override 1253 public List<Resilience4jConfigurationDefinition> getResilience4jConfigurations() { 1254 return resilience4jConfigurations; 1255 } 1256 1257 /** 1258 * Resilience4j Circuit Breaker EIP configurations 1259 */ 1260 public void setResilience4jConfigurations(List<Resilience4jConfigurationDefinition> resilience4jConfigurations) { 1261 this.resilience4jConfigurations = resilience4jConfigurations; 1262 } 1263 1264 @Override 1265 public FaultToleranceConfigurationDefinition getDefaultFaultToleranceConfiguration() { 1266 return defaultFaultToleranceConfiguration; 1267 } 1268 1269 /** 1270 * MicroProfile Fault Tolerance EIP default configuration 1271 */ 1272 public void setDefaultFaultToleranceConfiguration(FaultToleranceConfigurationDefinition defaultFaultToleranceConfiguration) { 1273 this.defaultFaultToleranceConfiguration = defaultFaultToleranceConfiguration; 1274 } 1275 1276 @Override 1277 public List<FaultToleranceConfigurationDefinition> getFaultToleranceConfigurations() { 1278 return faultToleranceConfigurations; 1279 } 1280 1281 /** 1282 * MicroProfile Circuit Breaker EIP configurations 1283 */ 1284 public void setFaultToleranceConfigurations(List<FaultToleranceConfigurationDefinition> faultToleranceConfigurations) { 1285 this.faultToleranceConfigurations = faultToleranceConfigurations; 1286 } 1287 1288 /** 1289 * Configuration of error handlers that triggers on exceptions thrown. 1290 */ 1291 public void setOnExceptions(List<OnExceptionDefinition> onExceptions) { 1292 this.onExceptions = onExceptions; 1293 } 1294 1295 @Override 1296 public List<OnExceptionDefinition> getOnExceptions() { 1297 return onExceptions; 1298 } 1299 1300 @Override 1301 public List<OnCompletionDefinition> getOnCompletions() { 1302 return onCompletions; 1303 } 1304 1305 /** 1306 * Configuration of sub routes to run at the completion of routing. 1307 */ 1308 public void setOnCompletions(List<OnCompletionDefinition> onCompletions) { 1309 this.onCompletions = onCompletions; 1310 } 1311 1312 @Override 1313 public ShutdownRoute getShutdownRoute() { 1314 return shutdownRoute; 1315 } 1316 1317 /** 1318 * Sets the ShutdownRoute option for routes. 1319 */ 1320 public void setShutdownRoute(ShutdownRoute shutdownRoute) { 1321 this.shutdownRoute = shutdownRoute; 1322 } 1323 1324 @Override 1325 public ShutdownRunningTask getShutdownRunningTask() { 1326 return shutdownRunningTask; 1327 } 1328 1329 /** 1330 * Sets the ShutdownRunningTask option to use when shutting down a route. 1331 */ 1332 public void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask) { 1333 this.shutdownRunningTask = shutdownRunningTask; 1334 } 1335 1336 @Override 1337 public List<ThreadPoolProfileDefinition> getThreadPoolProfiles() { 1338 return threadPoolProfiles; 1339 } 1340 1341 /** 1342 * Configuration of thread pool profiles. 1343 */ 1344 public void setThreadPoolProfiles(List<ThreadPoolProfileDefinition> threadPoolProfiles) { 1345 this.threadPoolProfiles = threadPoolProfiles; 1346 } 1347 1348 public List<CamelThreadPoolFactoryBean> getThreadPools() { 1349 return threadPools; 1350 } 1351 1352 /** 1353 * Configuration of thread pool 1354 */ 1355 public void setThreadPools(List<CamelThreadPoolFactoryBean> threadPools) { 1356 this.threadPools = threadPools; 1357 } 1358 1359 @Override 1360 public String getDependsOn() { 1361 return dependsOn; 1362 } 1363 1364 /** 1365 * List of other bean id's this CamelContext depends up. Multiple bean id's can be separated by comma. 1366 */ 1367 public void setDependsOn(String dependsOn) { 1368 this.dependsOn = dependsOn; 1369 } 1370 1371 public boolean isImplicitId() { 1372 return implicitId; 1373 } 1374 1375 public void setImplicitId(boolean flag) { 1376 implicitId = flag; 1377 } 1378}