-
Notifications
You must be signed in to change notification settings - Fork 4.9k
/
CamelContextFactoryBean.java
818 lines (680 loc) · 27.9 KB
/
CamelContextFactoryBean.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.blueprint;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Properties;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElements;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import org.apache.camel.LoggingLevel;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.ShutdownRoute;
import org.apache.camel.ShutdownRunningTask;
import org.apache.camel.TypeConverterExists;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.properties.PropertiesComponent;
import org.apache.camel.core.osgi.OsgiCamelContextPublisher;
import org.apache.camel.core.osgi.OsgiEventAdminNotifier;
import org.apache.camel.core.osgi.utils.BundleDelegatingClassLoader;
import org.apache.camel.core.xml.AbstractCamelContextFactoryBean;
import org.apache.camel.core.xml.AbstractCamelFactoryBean;
import org.apache.camel.core.xml.CamelJMXAgentDefinition;
import org.apache.camel.core.xml.CamelPropertyPlaceholderDefinition;
import org.apache.camel.core.xml.CamelServiceExporterDefinition;
import org.apache.camel.core.xml.CamelStreamCachingStrategyDefinition;
import org.apache.camel.model.ContextScanDefinition;
import org.apache.camel.model.GlobalOptionsDefinition;
import org.apache.camel.model.HystrixConfigurationDefinition;
import org.apache.camel.model.InterceptDefinition;
import org.apache.camel.model.InterceptFromDefinition;
import org.apache.camel.model.InterceptSendToEndpointDefinition;
import org.apache.camel.model.OnCompletionDefinition;
import org.apache.camel.model.OnExceptionDefinition;
import org.apache.camel.model.PackageScanDefinition;
import org.apache.camel.model.RestContextRefDefinition;
import org.apache.camel.model.RouteBuilderDefinition;
import org.apache.camel.model.RouteContextRefDefinition;
import org.apache.camel.model.RouteDefinition;
import org.apache.camel.model.ThreadPoolProfileDefinition;
import org.apache.camel.model.cloud.ServiceCallConfigurationDefinition;
import org.apache.camel.model.dataformat.DataFormatsDefinition;
import org.apache.camel.model.rest.RestConfigurationDefinition;
import org.apache.camel.model.rest.RestDefinition;
import org.apache.camel.model.transformer.TransformersDefinition;
import org.apache.camel.model.validator.ValidatorsDefinition;
import org.apache.camel.spi.PackageScanFilter;
import org.apache.camel.spi.Registry;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.blueprint.container.BlueprintContainer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* A bean to create and initialize a {@link BlueprintCamelContext}
* and install routes either explicitly configured in
* Blueprint XML or found by searching the classpath for Java classes which extend
* {@link RouteBuilder} using the nested {@link #setPackages(String[])}.
*/
@XmlRootElement(name = "camelContext")
@XmlAccessorType(XmlAccessType.FIELD)
public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<BlueprintCamelContext> {
private static final Logger LOG = LoggerFactory.getLogger(CamelContextFactoryBean.class);
@XmlAttribute(name = "depends-on")
private String dependsOn;
@XmlAttribute
private String trace;
@XmlAttribute
private String messageHistory;
@XmlAttribute
private String logMask;
@XmlAttribute
private String logExhaustedMessageBody;
@XmlAttribute
private String streamCache = "false";
@XmlAttribute
private String delayer;
@XmlAttribute
private String handleFault;
@XmlAttribute
private String errorHandlerRef;
@XmlAttribute
private String autoStartup = "true";
@XmlAttribute
private String useMDCLogging;
@XmlAttribute
private String useDataType;
@XmlAttribute
private String useBreadcrumb;
@XmlAttribute
private String allowUseOriginalMessage;
@XmlAttribute
private String runtimeEndpointRegistryEnabled;
@XmlAttribute
private String managementNamePattern;
@XmlAttribute
private String threadNamePattern;
@XmlAttribute
private Boolean useBlueprintPropertyResolver;
@XmlAttribute
private ShutdownRoute shutdownRoute;
@XmlAttribute
private ShutdownRunningTask shutdownRunningTask;
@XmlAttribute
private Boolean loadTypeConverters;
@XmlAttribute
private Boolean typeConverterStatisticsEnabled;
@XmlAttribute
private TypeConverterExists typeConverterExists;
@XmlAttribute
private LoggingLevel typeConverterExistsLoggingLevel;
@XmlElement(name = "globalOptions")
private GlobalOptionsDefinition globalOptions;
@XmlElement(name = "propertyPlaceholder", type = CamelPropertyPlaceholderDefinition.class)
private CamelPropertyPlaceholderDefinition camelPropertyPlaceholder;
@XmlElement(name = "package")
private String[] packages = {};
@XmlElement(name = "packageScan", type = PackageScanDefinition.class)
private PackageScanDefinition packageScan;
@XmlElement(name = "contextScan", type = ContextScanDefinition.class)
private ContextScanDefinition contextScan;
@XmlElement(name = "jmxAgent", type = CamelJMXAgentDefinition.class)
private CamelJMXAgentDefinition camelJMXAgent;
@XmlElement(name = "streamCaching", type = CamelStreamCachingStrategyDefinition.class)
private CamelStreamCachingStrategyDefinition camelStreamCachingStrategy;
@XmlElements({
@XmlElement(name = "template", type = CamelProducerTemplateFactoryBean.class),
@XmlElement(name = "fluentTemplate", type = CamelFluentProducerTemplateFactoryBean.class),
@XmlElement(name = "consumerTemplate", type = CamelConsumerTemplateFactoryBean.class),
@XmlElement(name = "proxy", type = CamelProxyFactoryBean.class),
@XmlElement(name = "errorHandler", type = CamelErrorHandlerFactoryBean.class)})
private List<AbstractCamelFactoryBean<?>> beansFactory;
@XmlElements({
@XmlElement(name = "export", type = CamelServiceExporterDefinition.class) })
private List<?> beans;
@XmlElement(name = "defaultServiceCallConfiguration")
private ServiceCallConfigurationDefinition defaultServiceCallConfiguration;
@XmlElement(name = "serviceCallConfiguration", type = ServiceCallConfigurationDefinition.class)
private List<ServiceCallConfigurationDefinition> serviceCallConfigurations;
@XmlElement(name = "defaultHystrixConfiguration")
private HystrixConfigurationDefinition defaultHystrixConfiguration;
@XmlElement(name = "hystrixConfiguration", type = HystrixConfigurationDefinition.class)
private List<HystrixConfigurationDefinition> hystrixConfigurations;
@XmlElement(name = "routeBuilder")
private List<RouteBuilderDefinition> builderRefs = new ArrayList<>();
@XmlElement(name = "routeContextRef")
private List<RouteContextRefDefinition> routeRefs = new ArrayList<>();
@XmlElement(name = "restContextRef")
private List<RestContextRefDefinition> restRefs = new ArrayList<>();
@XmlElement(name = "threadPoolProfile")
private List<ThreadPoolProfileDefinition> threadPoolProfiles;
@XmlElement(name = "threadPool")
private List<CamelThreadPoolFactoryBean> threadPools;
@XmlElement(name = "endpoint")
private List<CamelEndpointFactoryBean> endpoints;
@XmlElement(name = "dataFormats")
private DataFormatsDefinition dataFormats;
@XmlElement(name = "transformers")
private TransformersDefinition transformers;
@XmlElement(name = "validators")
private ValidatorsDefinition validators;
@XmlElement(name = "redeliveryPolicyProfile")
private List<CamelRedeliveryPolicyFactoryBean> redeliveryPolicies;
@XmlElement(name = "onException")
private List<OnExceptionDefinition> onExceptions = new ArrayList<>();
@XmlElement(name = "onCompletion")
private List<OnCompletionDefinition> onCompletions = new ArrayList<>();
@XmlElement(name = "intercept")
private List<InterceptDefinition> intercepts = new ArrayList<>();
@XmlElement(name = "interceptFrom")
private List<InterceptFromDefinition> interceptFroms = new ArrayList<>();
@XmlElement(name = "interceptSendToEndpoint")
private List<InterceptSendToEndpointDefinition> interceptSendToEndpoints = new ArrayList<>();
@XmlElement(name = "restConfiguration")
private RestConfigurationDefinition restConfiguration;
@XmlElement(name = "rest")
private List<RestDefinition> rests = new ArrayList<>();
@XmlElement(name = "route")
private List<RouteDefinition> routes = new ArrayList<>();
@XmlTransient
private BlueprintCamelContext context;
@XmlTransient
private BlueprintContainer blueprintContainer;
@XmlTransient
private BundleContext bundleContext;
@XmlTransient
private boolean implicitId;
@XmlTransient
private OsgiCamelContextPublisher osgiCamelContextPublisher;
public Class<BlueprintCamelContext> getObjectType() {
return BlueprintCamelContext.class;
}
@Override
public BlueprintCamelContext getContext(boolean create) {
if (context == null && create) {
context = createContext();
if (!isImplicitId()) {
context.setName(getId());
}
}
return context;
}
public void setBlueprintContainer(BlueprintContainer blueprintContainer) {
this.blueprintContainer = blueprintContainer;
}
public void setBundleContext(BundleContext bundleContext) {
this.bundleContext = bundleContext;
}
protected BlueprintCamelContext createContext() {
return new BlueprintCamelContext(bundleContext, blueprintContainer);
}
@Override
protected void initCustomRegistry(BlueprintCamelContext context) {
Registry registry = getBeanForType(Registry.class);
if (registry != null) {
LOG.info("Using custom Registry: {}", registry);
context.setRegistry(registry);
}
}
@Override
protected <S> S getBeanForType(Class<S> clazz) {
Collection<S> objects = BlueprintContainerBeanRepository.lookupByType(blueprintContainer, clazz).values();
if (objects.size() == 1) {
return objects.iterator().next();
}
return null;
}
@Override
protected void initPropertyPlaceholder() throws Exception {
super.initPropertyPlaceholder();
// if blueprint property resolver is enabled on CamelContext then bridge PropertiesComponent to blueprint
if (isUseBlueprintPropertyResolver()) {
// lookup existing configured properties component
PropertiesComponent pc = getContext().getComponent("properties", PropertiesComponent.class);
BlueprintPropertiesParser parser = new BlueprintPropertiesParser(pc, blueprintContainer, pc.getPropertiesParser());
BlueprintPropertiesResolver resolver = new BlueprintPropertiesResolver(pc.getPropertiesResolver(), parser);
// any extra properties
ServiceReference<?> ref = bundleContext.getServiceReference(PropertiesComponent.OVERRIDE_PROPERTIES);
if (ref != null) {
Properties extra = (Properties) bundleContext.getService(ref);
if (extra != null) {
pc.setOverrideProperties(extra);
}
}
// no locations has been set, so its a default component
if (pc.getLocations() == null) {
String[] ids = parser.lookupPropertyPlaceholderIds();
for (int i = 0; i < ids.length; i++) {
if (!ids[i].startsWith("blueprint:")) {
ids[i] = "blueprint:" + ids[i];
}
}
if (ids.length > 0) {
// location supports multiple separated by comma
pc.setLocations(ids);
}
}
if (pc.getLocations() != null) {
// bridge camel properties with blueprint
pc.setPropertiesParser(parser);
pc.setPropertiesResolver(resolver);
}
}
}
@Override
protected void initBeanPostProcessor(BlueprintCamelContext context) {
}
@Override
protected void postProcessBeforeInit(RouteBuilder builder) {
}
@Override
protected void findRouteBuildersByPackageScan(String[] packages, PackageScanFilter filter, List<RoutesBuilder> builders) throws Exception {
// add filter to class resolver which then will filter
getContext().getPackageScanClassResolver().addFilter(filter);
ClassLoader classLoader = new BundleDelegatingClassLoader(bundleContext.getBundle());
PackageScanRouteBuilderFinder finder = new PackageScanRouteBuilderFinder(getContext(), packages, classLoader,
getContext().getPackageScanClassResolver());
finder.appendBuilders(builders);
// and remove the filter
getContext().getPackageScanClassResolver().removeFilter(filter);
}
@Override
protected void findRouteBuildersByContextScan(PackageScanFilter filter, boolean includeNonSingletons, List<RoutesBuilder> builders) throws Exception {
ContextScanRouteBuilderFinder finder = new ContextScanRouteBuilderFinder(getContext(), filter, includeNonSingletons);
finder.appendBuilders(builders);
}
@Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
// setup the application context classloader with the bundle delegating classloader
ClassLoader cl = new BundleDelegatingClassLoader(bundleContext.getBundle());
LOG.debug("Set the application context classloader to: {}", cl);
getContext().setApplicationContextClassLoader(cl);
osgiCamelContextPublisher = new OsgiCamelContextPublisher(bundleContext);
osgiCamelContextPublisher.start();
getContext().getManagementStrategy().addEventNotifier(osgiCamelContextPublisher);
try {
getClass().getClassLoader().loadClass("org.osgi.service.event.EventAdmin");
getContext().getManagementStrategy().addEventNotifier(new OsgiEventAdminNotifier(bundleContext));
} catch (Throwable t) {
// Ignore, if the EventAdmin package is not available, just don't use it
LOG.debug("EventAdmin package is not available, just don't use it");
}
// ensure routes is setup
setupRoutes();
}
@Override
public void destroy() throws Exception {
super.destroy();
if (osgiCamelContextPublisher != null) {
osgiCamelContextPublisher.shutdown();
}
}
public String getDependsOn() {
return dependsOn;
}
public void setDependsOn(String dependsOn) {
this.dependsOn = dependsOn;
}
public String getAutoStartup() {
return autoStartup;
}
public void setAutoStartup(String autoStartup) {
this.autoStartup = autoStartup;
}
public String getUseMDCLogging() {
return useMDCLogging;
}
public void setUseMDCLogging(String useMDCLogging) {
this.useMDCLogging = useMDCLogging;
}
public String getUseDataType() {
return useDataType;
}
public void setUseDataType(String useDataType) {
this.useDataType = useDataType;
}
public String getUseBreadcrumb() {
return useBreadcrumb;
}
public void setUseBreadcrumb(String useBreadcrumb) {
this.useBreadcrumb = useBreadcrumb;
}
public String getAllowUseOriginalMessage() {
return allowUseOriginalMessage;
}
public void setAllowUseOriginalMessage(String allowUseOriginalMessage) {
this.allowUseOriginalMessage = allowUseOriginalMessage;
}
public String getRuntimeEndpointRegistryEnabled() {
return runtimeEndpointRegistryEnabled;
}
public void setRuntimeEndpointRegistryEnabled(String runtimeEndpointRegistryEnabled) {
this.runtimeEndpointRegistryEnabled = runtimeEndpointRegistryEnabled;
}
public String getManagementNamePattern() {
return managementNamePattern;
}
public void setManagementNamePattern(String managementNamePattern) {
this.managementNamePattern = managementNamePattern;
}
public String getThreadNamePattern() {
return threadNamePattern;
}
public void setThreadNamePattern(String threadNamePattern) {
this.threadNamePattern = threadNamePattern;
}
@Override
public Boolean getLoadTypeConverters() {
return loadTypeConverters;
}
public void setLoadTypeConverters(Boolean loadTypeConverters) {
this.loadTypeConverters = loadTypeConverters;
}
public Boolean getTypeConverterStatisticsEnabled() {
return typeConverterStatisticsEnabled;
}
public void setTypeConverterStatisticsEnabled(Boolean typeConverterStatisticsEnabled) {
this.typeConverterStatisticsEnabled = typeConverterStatisticsEnabled;
}
public TypeConverterExists getTypeConverterExists() {
return typeConverterExists;
}
public void setTypeConverterExists(TypeConverterExists typeConverterExists) {
this.typeConverterExists = typeConverterExists;
}
public LoggingLevel getTypeConverterExistsLoggingLevel() {
return typeConverterExistsLoggingLevel;
}
public void setTypeConverterExistsLoggingLevel(LoggingLevel typeConverterExistsLoggingLevel) {
this.typeConverterExistsLoggingLevel = typeConverterExistsLoggingLevel;
}
public ShutdownRoute getShutdownRoute() {
return shutdownRoute;
}
public void setShutdownRoute(ShutdownRoute shutdownRoute) {
this.shutdownRoute = shutdownRoute;
}
public ShutdownRunningTask getShutdownRunningTask() {
return shutdownRunningTask;
}
public void setShutdownRunningTask(ShutdownRunningTask shutdownRunningTask) {
this.shutdownRunningTask = shutdownRunningTask;
}
public CamelPropertyPlaceholderDefinition getCamelPropertyPlaceholder() {
return camelPropertyPlaceholder;
}
public void setCamelPropertyPlaceholder(CamelPropertyPlaceholderDefinition camelPropertyPlaceholder) {
this.camelPropertyPlaceholder = camelPropertyPlaceholder;
}
public List<RouteContextRefDefinition> getRouteRefs() {
return routeRefs;
}
public void setRouteRefs(List<RouteContextRefDefinition> routeRefs) {
this.routeRefs = routeRefs;
}
public List<RestContextRefDefinition> getRestRefs() {
return restRefs;
}
public void setRestRefs(List<RestContextRefDefinition> restRefs) {
this.restRefs = restRefs;
}
public List<CamelRedeliveryPolicyFactoryBean> getRedeliveryPolicies() {
return redeliveryPolicies;
}
public void setRedeliveryPolicies(List<CamelRedeliveryPolicyFactoryBean> redeliveryPolicies) {
this.redeliveryPolicies = redeliveryPolicies;
}
public List<ThreadPoolProfileDefinition> getThreadPoolProfiles() {
return threadPoolProfiles;
}
public void setThreadPoolProfiles(List<ThreadPoolProfileDefinition> threadPoolProfiles) {
this.threadPoolProfiles = threadPoolProfiles;
}
public List<CamelThreadPoolFactoryBean> getThreadPools() {
return threadPools;
}
public void setThreadPools(List<CamelThreadPoolFactoryBean> threadPools) {
this.threadPools = threadPools;
}
public String getTrace() {
return trace;
}
public void setTrace(String trace) {
this.trace = trace;
}
public String getMessageHistory() {
return messageHistory;
}
public void setMessageHistory(String messageHistory) {
this.messageHistory = messageHistory;
}
public String getLogMask() {
return logMask;
}
public void setLogMask(String logMask) {
this.logMask = logMask;
}
public String getLogExhaustedMessageBody() {
return logExhaustedMessageBody;
}
public void setLogExhaustedMessageBody(String logExhaustedMessageBody) {
this.logExhaustedMessageBody = logExhaustedMessageBody;
}
public String getStreamCache() {
return streamCache;
}
public void setStreamCache(String streamCache) {
this.streamCache = streamCache;
}
public String getDelayer() {
return delayer;
}
public void setDelayer(String delayer) {
this.delayer = delayer;
}
public String getHandleFault() {
return handleFault;
}
public void setHandleFault(String handleFault) {
this.handleFault = handleFault;
}
public String getErrorHandlerRef() {
return errorHandlerRef;
}
public void setErrorHandlerRef(String errorHandlerRef) {
this.errorHandlerRef = errorHandlerRef;
}
@Override
public GlobalOptionsDefinition getGlobalOptions() {
return globalOptions;
}
public void setGlobalOptions(GlobalOptionsDefinition globalOptions) {
this.globalOptions = globalOptions;
}
public String[] getPackages() {
return packages;
}
public void setPackages(String[] packages) {
this.packages = packages;
}
public PackageScanDefinition getPackageScan() {
return packageScan;
}
public void setPackageScan(PackageScanDefinition packageScan) {
this.packageScan = packageScan;
}
public ContextScanDefinition getContextScan() {
return contextScan;
}
public void setContextScan(ContextScanDefinition contextScan) {
this.contextScan = contextScan;
}
public CamelJMXAgentDefinition getCamelJMXAgent() {
return camelJMXAgent;
}
public void setCamelJMXAgent(CamelJMXAgentDefinition camelJMXAgent) {
this.camelJMXAgent = camelJMXAgent;
}
public CamelStreamCachingStrategyDefinition getCamelStreamCachingStrategy() {
return camelStreamCachingStrategy;
}
public void setCamelStreamCachingStrategy(CamelStreamCachingStrategyDefinition camelStreamCachingStrategy) {
this.camelStreamCachingStrategy = camelStreamCachingStrategy;
}
@Override
public List<AbstractCamelFactoryBean<?>> getBeansFactory() {
return beansFactory;
}
public void setBeansFactory(List<AbstractCamelFactoryBean<?>> beansFactory) {
this.beansFactory = beansFactory;
}
@Override
public List<?> getBeans() {
return beans;
}
public void setBeans(List<?> beans) {
this.beans = beans;
}
@Override
public ServiceCallConfigurationDefinition getDefaultServiceCallConfiguration() {
return defaultServiceCallConfiguration;
}
public void setDefaultServiceCallConfiguration(ServiceCallConfigurationDefinition defaultServiceCallConfiguration) {
this.defaultServiceCallConfiguration = defaultServiceCallConfiguration;
}
@Override
public List<ServiceCallConfigurationDefinition> getServiceCallConfigurations() {
return serviceCallConfigurations;
}
public void setServiceCallConfigurations(List<ServiceCallConfigurationDefinition> serviceCallConfigurations) {
this.serviceCallConfigurations = serviceCallConfigurations;
}
@Override
public HystrixConfigurationDefinition getDefaultHystrixConfiguration() {
return defaultHystrixConfiguration;
}
public void setDefaultHystrixConfiguration(HystrixConfigurationDefinition defaultHystrixConfiguration) {
this.defaultHystrixConfiguration = defaultHystrixConfiguration;
}
@Override
public List<HystrixConfigurationDefinition> getHystrixConfigurations() {
return hystrixConfigurations;
}
public void setHystrixConfigurations(List<HystrixConfigurationDefinition> hystrixConfigurations) {
this.hystrixConfigurations = hystrixConfigurations;
}
public List<RouteBuilderDefinition> getBuilderRefs() {
return builderRefs;
}
public void setBuilderRefs(List<RouteBuilderDefinition> builderRefs) {
this.builderRefs = builderRefs;
}
public List<CamelEndpointFactoryBean> getEndpoints() {
return endpoints;
}
public void setEndpoints(List<CamelEndpointFactoryBean> endpoints) {
this.endpoints = endpoints;
}
public DataFormatsDefinition getDataFormats() {
return dataFormats;
}
public void setDataFormats(DataFormatsDefinition dataFormats) {
this.dataFormats = dataFormats;
}
public void setTransformers(TransformersDefinition transformers) {
this.transformers = transformers;
}
public TransformersDefinition getTransformers() {
return transformers;
}
public void setValidators(ValidatorsDefinition validators) {
this.validators = validators;
}
public ValidatorsDefinition getValidators() {
return validators;
}
public List<OnExceptionDefinition> getOnExceptions() {
return onExceptions;
}
public void setOnExceptions(List<OnExceptionDefinition> onExceptions) {
this.onExceptions = onExceptions;
}
public List<OnCompletionDefinition> getOnCompletions() {
return onCompletions;
}
public void setOnCompletions(List<OnCompletionDefinition> onCompletions) {
this.onCompletions = onCompletions;
}
public List<InterceptDefinition> getIntercepts() {
return intercepts;
}
public void setIntercepts(List<InterceptDefinition> intercepts) {
this.intercepts = intercepts;
}
public List<InterceptFromDefinition> getInterceptFroms() {
return interceptFroms;
}
public void setInterceptFroms(List<InterceptFromDefinition> interceptFroms) {
this.interceptFroms = interceptFroms;
}
public List<InterceptSendToEndpointDefinition> getInterceptSendToEndpoints() {
return interceptSendToEndpoints;
}
public void setInterceptSendToEndpoints(List<InterceptSendToEndpointDefinition> interceptSendToEndpoints) {
this.interceptSendToEndpoints = interceptSendToEndpoints;
}
public List<RouteDefinition> getRoutes() {
return routes;
}
public void setRoutes(List<RouteDefinition> routes) {
this.routes = routes;
}
public List<RestDefinition> getRests() {
return rests;
}
public void setRests(List<RestDefinition> rests) {
this.rests = rests;
}
public RestConfigurationDefinition getRestConfiguration() {
return restConfiguration;
}
public void setRestConfiguration(RestConfigurationDefinition restConfiguration) {
this.restConfiguration = restConfiguration;
}
public boolean isImplicitId() {
return implicitId;
}
public void setImplicitId(boolean flag) {
implicitId = flag;
}
public Boolean getUseBlueprintPropertyResolver() {
return useBlueprintPropertyResolver;
}
public void setUseBlueprintPropertyResolver(Boolean useBlueprintPropertyResolver) {
this.useBlueprintPropertyResolver = useBlueprintPropertyResolver;
}
public boolean isUseBlueprintPropertyResolver() {
// enable by default
return useBlueprintPropertyResolver == null || useBlueprintPropertyResolver.booleanValue();
}
}