Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[maven-release-plugin] copy for tag camel-2.9.0

git-svn-id: https://svn.apache.org/repos/asf/camel/tags/camel-2.9.0@1225049 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 4a0282b413db910b4a5ab6c9f9c65a1c8d5b8c04 2 parents 1399080 + a1eb5c4
@hzbarcea hzbarcea authored
Showing with 899 additions and 952 deletions.
  1. +3 −1 camel-core/src/main/java/org/apache/camel/CamelAuthorizationException.java
  2. +8 −3 camel-core/src/main/java/org/apache/camel/IsSingleton.java
  3. +2 −2 camel-core/src/main/java/org/apache/camel/MultipleConsumersSupport.java
  4. +6 −6 camel-core/src/main/java/org/apache/camel/api/management/PerformanceCounter.java
  5. +2 −2 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
  6. +1 −1  camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedComponentMBean.java
  7. +1 −1  camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedConsumerMBean.java
  8. +2 −2 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedEndpointMBean.java
  9. +1 −1  camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedErrorHandlerMBean.java
  10. +3 −3 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedProcessorMBean.java
  11. +1 −1  camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedProducerMBean.java
  12. +3 −3 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
  13. +2 −2 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedSendProcessorMBean.java
  14. +2 −2 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedServiceMBean.java
  15. +4 −4 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedThreadPoolMBean.java
  16. +11 −11 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedTracerMBean.java
  17. +2 −1  camel-core/src/main/java/org/apache/camel/api/management/package.html
  18. +1 −1  camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
  19. +1 −1  camel-core/src/main/java/org/apache/camel/builder/xml/Namespaces.java
  20. +3 −3 camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java
  21. +1 −1  camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
  22. +9 −9 camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
  23. +1 −1  camel-core/src/main/java/org/apache/camel/component/bean/BeanProcessor.java
  24. +1 −1  camel-core/src/main/java/org/apache/camel/component/bean/DefaultAnnotationExpressionFactory.java
  25. +3 −3 camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
  26. +1 −1  camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
  27. +1 −1  camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
  28. +1 −1  camel-core/src/main/java/org/apache/camel/component/dataset/DataSetSupport.java
  29. +1 −1  camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
  30. +1 −1  camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
  31. +1 −1  camel-core/src/main/java/org/apache/camel/component/ref/RefComponent.java
  32. +16 −3 camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
  33. +10 −0 camel-core/src/main/java/org/apache/camel/converter/IOConverter.java
  34. +2 −2 camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
  35. +0 −1  camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
  36. +0 −2  camel-core/src/main/java/org/apache/camel/impl/MappedEndpointConfiguration.java
  37. +1 −1  camel-core/src/main/java/org/apache/camel/impl/MessageSupport.java
  38. +6 −2 camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
  39. +0 −1  camel-core/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java
  40. +0 −1  camel-core/src/main/java/org/apache/camel/model/language/ExpressionDefinition.java
  41. +0 −1  camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java
  42. +4 −2 camel-core/src/main/java/org/apache/camel/processor/LogProcessor.java
  43. +0 −2  camel-core/src/main/java/org/apache/camel/processor/Resequencer.java
  44. +0 −1  camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
  45. +0 −1  camel-core/src/main/java/org/apache/camel/processor/resequencer/ResequencerEngine.java
  46. +1 −1  camel-core/src/main/java/org/apache/camel/spi/RouteContext.java
  47. +0 −1  camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java
  48. +15 −1 camel-core/src/main/java/org/apache/camel/util/CamelLogger.java
  49. +2 −2 camel-core/src/main/java/org/apache/camel/util/ExpressionComparator.java
  50. +1 −1  camel-core/src/main/java/org/apache/camel/util/LRUSoftCache.java
  51. +10 −10 camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
  52. +7 −7 camel-core/src/main/java/org/apache/camel/util/OgnlHelper.java
  53. +5 −5 camel-core/src/main/java/org/apache/camel/util/PackageHelper.java
  54. +1 −1  camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java
  55. +9 −10 camel-core/src/main/java/org/apache/camel/util/ResourceHelper.java
  56. +1 −1  camel-core/src/main/java/org/apache/camel/util/package.html
  57. +1 −1  camel-core/src/main/java/org/apache/camel/view/NodeData.java
  58. +0 −1  camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java
  59. +58 −0 camel-core/src/test/java/org/apache/camel/component/seda/SedaFromRouteIdTest.java
  60. +0 −2  camel-core/src/test/java/org/apache/camel/component/vm/VMSplitterTest.java
  61. +0 −2  camel-core/src/test/java/org/apache/camel/component/xslt/XsltFileNotFoundTest.java
  62. +17 −0 camel-core/src/test/java/org/apache/camel/converter/IOConverterTest.java
  63. +8 −0 camel-core/src/test/java/org/apache/camel/language/simple/SimpleParserPredicateTest.java
  64. +3 −0  camel-core/src/test/java/org/apache/camel/language/simple/SimpleParserRegexpPredicateTest.java
  65. +10 −0 camel-core/src/test/java/org/apache/camel/processor/LogProcessorTest.java
  66. +68 −0 camel-core/src/test/java/org/apache/camel/processor/SplitterPropertyContinuedTest.java
  67. +0 −1  camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateForceCompletionHeaderTest.java
  68. +0 −1  components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
  69. +0 −1  components/camel-ahc/src/main/java/org/apache/camel/component/ahc/DefaultAhcBinding.java
  70. +0 −1  components/camel-ahc/src/main/java/org/apache/camel/component/ahc/helper/AhcHelper.java
  71. +3 −1 components/camel-amqp/src/main/java/org/apache/camel/component/amqp/AMQPComponent.java
  72. +1 −1  components/camel-amqp/src/test/java/org/apache/camel/component/amqp/AMQPRouteTest.java
  73. +0 −1  components/camel-apns/src/test/java/org/apache/camel/component/apns/util/ApnsUtils.java
  74. +0 −1  components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomEntryPollingConsumer.java
  75. +0 −1  components/camel-atom/src/main/java/org/apache/camel/component/atom/AtomPollingConsumer.java
  76. +1 −1  components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Component.java
  77. +6 −0 components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
  78. +1 −1  components/camel-aws/src/main/java/org/apache/camel/component/aws/sdb/SdbComponent.java
  79. +6 −0 components/camel-aws/src/main/java/org/apache/camel/component/aws/sdb/SdbEndpoint.java
  80. +1 −1  components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesComponent.java
  81. +6 −0 components/camel-aws/src/main/java/org/apache/camel/component/aws/ses/SesEndpoint.java
  82. +1 −1  components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsComponent.java
  83. +7 −1 components/camel-aws/src/main/java/org/apache/camel/component/aws/sns/SnsEndpoint.java
  84. +2 −7 components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
  85. +0 −3  components/camel-bam/src/main/java/org/apache/camel/bam/model/ActivityDefinition.java
  86. +0 −2  components/camel-bam/src/main/java/org/apache/camel/bam/model/ActivityState.java
  87. +0 −4 components/camel-bam/src/main/java/org/apache/camel/bam/model/ProcessDefinition.java
  88. +1 −1  components/camel-bam/src/main/java/org/apache/camel/bam/processor/ActivityMonitorEngine.java
  89. +1 −1  components/camel-bam/src/main/java/org/apache/camel/bam/processor/JpaBamProcessor.java
  90. +1 −1  components/camel-bam/src/main/java/org/apache/camel/bam/rules/ActivityRules.java
  91. +1 −1  components/camel-bam/src/main/java/org/apache/camel/bam/rules/TemporalRule.java
  92. +2 −3 components/camel-bam/src/test/java/org/apache/camel/bam/BamRouteTest.java
  93. +0 −5 components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyAbstractDataFormat.java
  94. +0 −2  components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/format/DatePatternFormat.java
  95. +0 −2  ...nts/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java
  96. +0 −2  ...camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fix/BindySimpleKeyValuePairMarshallDslTest.java
  97. +0 −2  ...c/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallTest.java
  98. +0 −1  ...nents/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/fix/complex/onetomany/Security.java
  99. +0 −1  components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/fix/withoutsection/Order.java
  100. +1 −1  components/camel-blueprint/src/main/java/org/apache/camel/blueprint/BlueprintComponentResolver.java
  101. +1 −1  components/camel-blueprint/src/main/java/org/apache/camel/blueprint/PackageScanRouteBuilderFinder.java
  102. +6 −6 components/camel-blueprint/src/main/java/org/apache/camel/blueprint/handler/CamelNamespaceHandler.java
  103. +45 −0 components/camel-cache/src/main/java/org/apache/camel/component/cache/FileCacheManagerFactory.java
  104. +2 −1  components/camel-cache/src/test/java/org/apache/camel/component/cache/CacheManagerFactoryRefTest.java
  105. +12 −15 ....java → camel-cache/src/test/java/org/apache/camel/component/cache/FileCacheManagerFactoyRefTest.java}
  106. +0 −1  components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdComponent.java
  107. +2 −2 components/camel-context/src/main/java/org/apache/camel/component/context/LocalContextComponent.java
  108. +3 −3 components/camel-context/src/test/java/org/apache/camel/component/context/JavaDslBlackBoxTest.java
  109. +1 −1  ...nents/camel-context/src/test/java/org/apache/camel/component/context/JavaDslBlackBoxWithVerboseUriTest.java
  110. +1 −1  components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
  111. +0 −1  components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPDataFormatUtil.java
  112. +0 −1  components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
  113. +0 −48 components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/transport/JbiServiceProcessor.java
  114. +0 −46 components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/transport/ProxyProcessor.java
  115. +0 −99 ...nents/camel-cxf-transport/src/test/resources/org/apache/camel/component/cxf/cxfbean/CxfBeanTest-context.xml
  116. +0 −35 ...c/test/resources/org/apache/camel/component/cxf/cxfbean/CxfBeanWithWsdlLocationInBeanAndIoCTest-context.xml
  117. +0 −33 ...ort/src/test/resources/org/apache/camel/component/cxf/cxfbean/CxfBeanWithWsdlLocationInBeanTest-context.xml
  118. +0 −3  components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfBlueprintEndpoint.java
  119. +0 −1  components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfPayload.java
  120. +5 −0 components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java
  121. +0 −1  components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfSpringEndpoint.java
  122. +0 −1  components/camel-cxf/src/main/java/org/apache/camel/component/cxf/blueprint/AbstractBeanDefinitionParser.java
  123. +0 −1  components/camel-cxf/src/main/java/org/apache/camel/component/cxf/blueprint/CxfNamespaceHandler.java
  124. +0 −1  components/camel-cxf/src/main/java/org/apache/camel/component/cxf/blueprint/RsClientBlueprintBean.java
  125. +0 −7 components/camel-cxf/src/main/java/org/apache/camel/component/cxf/blueprint/RsClientDefinitionParser.java
  126. +0 −1  components/camel-cxf/src/main/java/org/apache/camel/component/cxf/blueprint/RsServerDefinitionParser.java
  127. +0 −9 components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfConverter.java
  128. +0 −6 components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java
  129. +0 −4 components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/MessageDataFormatFeature.java
  130. +0 −4 components/camel-cxf/src/main/java/org/apache/camel/component/cxf/feature/PayLoadDataFormatFeature.java
  131. +2 −1  components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsBlueprintEndpoint.java
  132. +3 −1 components/camel-cxf/src/main/java/org/apache/camel/component/cxf/jaxrs/CxfRsSpringEndpoint.java
  133. +1 −1  components/camel-cxf/src/main/resources/META-INF/spring.schemas
  134. +0 −15 components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFGreeterRouterTest.java
  135. +0 −1  ...onents/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFWsdlOnlyPayloadModeNoSpringSoap12Test.java
  136. +0 −3  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFWsdlOnlyPayloadModeNoSpringTest.java
  137. +0 −3  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayLoadFaultMessageTest.java
  138. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfDispatchMessageTest.java
  139. +0 −3  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfDispatchTestSupport.java
  140. +0 −2  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfEndpointTest.java
  141. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterConverterRouterTest.java
  142. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterMessageRouterTest.java
  143. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadRouterTest.java
  144. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfGreeterPayLoadWithFeatureRouterTest.java
  145. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfJavaOnlyPayloadModeTest.java
  146. +0 −4 components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMixedModeRouterTest.java
  147. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfMultipleConsumersSupportTest.java
  148. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfNonWrapperTest.java
  149. +0 −2  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadSoapHeaderTest.java
  150. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerRouterTest.java
  151. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
  152. +0 −2  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterTest.java
  153. +0 −2  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfSimpleRouterWithUnwrappedStyleTest.java
  154. +0 −10 components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstPayloadModeTest.java
  155. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfWsdlFirstProcessorTest.java
  156. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/holder/CxfHolderConsumerTest.java
  157. +8 −1 components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointWithProperties.java
  158. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerAddressOverrideTest.java
  159. +0 −2  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
  160. +0 −2  ...nts/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomDisabledConsumerPayloadModeTest.java
  161. +0 −2  ...nts/camel-cxf/src/test/java/org/apache/camel/component/cxf/mtom/CxfMtomDisabledProducerPayloadModeTest.java
  162. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
  163. +0 −6 components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanBusSettingTest.java
  164. +0 −2  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/CxfEndpointBeanWithBusTest.java
  165. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.java
  166. +0 −2  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/CxfEndpointUtilsTest.java
  167. +0 −1  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsa/WSAddressingTest.java
  168. +0 −2  components/camel-cxf/src/test/java/org/apache/camel/component/cxf/wsdl/Order.java
  169. +4 −0 components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/CxfRsEndpointWithProperties.xml
  170. +1 −1  components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/jaxrs/testEndpoint.properties
  171. +0 −1  components/camel-dns/src/main/java/org/apache/camel/component/dns/DnsLookupEndpoint.java
  172. +0 −2  components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminConsumer.java
  173. +0 −1  components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminEndpoint.java
  174. +0 −1  components/camel-gae/src/main/java/org/apache/camel/component/gae/task/GTaskComponent.java
  175. +0 −2  components/camel-gae/src/test/java/org/apache/camel/component/gae/http/GHttpCombinedRouteBuilderTest.java
  176. +0 −2  components/camel-groovy/src/main/java/org/apache/camel/language/groovy/GroovyRouteBuilder.java
  177. +1 −1  components/camel-guice/src/test/java/org/apache/camel/guice/ComponentFoundInRegistryTest.java
  178. +1 −1  components/camel-guice/src/test/java/org/apache/camel/guice/ConciseGuiceRouteTest.java
  179. +0 −6 components/camel-guice/src/test/java/org/apache/camel/guice/FileEndpointReferenceRouteTest.java
  180. +0 −1  .../camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/instance/HazelcastInstanceConsumer.java
  181. +0 −1  components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/list/HazelcastListConsumer.java
  182. +0 −1  components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/list/HazelcastListProducer.java
  183. +0 −1  .../camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/multimap/HazelcastMultimapConsumer.java
  184. +0 −1  components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastListConsumerTest.java
  185. +0 −1  components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapConsumerTest.java
  186. +0 −1  ...s/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapProducerForSpringTest.java
  187. +0 −1  components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapProducerTest.java
  188. +0 −1  ...nents/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapConsumerTest.java
  189. +0 −1  ...nents/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerTest.java
  190. +0 −1  ...ents/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java
  191. +0 −1  components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
  192. +0 −1  components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
  193. +0 −1  components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
  194. +0 −3  ...ts/camel-http4/src/test/java/org/apache/camel/component/http4/HttpProducerTwoParametersWithSameKeyTest.java
  195. +0 −2  components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcChannel.java
  196. +0 −2  components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcConfigurationTest.java
  197. +0 −2  components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcEndpointTest.java
  198. +0 −1  components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcProducerTest.java
  199. +0 −1  components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
  200. +0 −1  components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
  201. +0 −2  components/camel-jaxb/src/test/java/org/apache/camel/example/Foo.java
  202. +0 −2  components/camel-jaxb/src/test/java/org/apache/camel/example/SpringDataFormatPartialTest.java
  203. +0 −6 components/camel-jaxb/src/test/java/org/apache/camel/jaxb/CamelJaxbTest.java
  204. +0 −4 components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/JcloudsBlobStoreConsumer.java
  205. +0 −2  components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/JcloudsBlobStoreHelper.java
  206. +0 −6 components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/JcloudsBlobStoreProducer.java
  207. +0 −1  components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrAuthTestBase.java
  208. +0 −3  components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcOptionsTest.java
  209. +0 −7 components/camel-jetty/src/main/java/org/apache/camel/component/jetty/CamelMultipartFilter.java
  210. +0 −8 components/camel-jetty/src/test/java/org/apache/camel/component/jetty/CustomFiltersTest.java
  211. +0 −1  components/camel-jetty/src/test/java/org/apache/camel/component/jetty/MultiPartFormWithCustomFilterTest.java
  212. +0 −1  components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
  213. +0 −2  components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsSelectorInTest.java
  214. +0 −3  components/camel-josql/src/main/java/org/apache/camel/language/sql/SqlLanguage.java
  215. +0 −3  components/camel-josql/src/test/java/org/apache/camel/builder/sql/SqlTest.java
  216. +0 −2  components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400DataQueueConsumer.java
  217. +0 −2  components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400DataQueueConsumerTest.java
  218. +0 −1  components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400PgmRouteTest.java
  219. +0 −2  components/camel-krati/src/main/java/org/apache/camel/component/krati/KratiEndpoint.java
  220. +0 −3  components/camel-krati/src/test/java/org/apache/camel/component/krati/KratiProducerTest.java
  221. +0 −1  components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
  222. +1 −0  components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
  223. +2 −1  components/camel-mail/src/test/java/org/apache/camel/component/mail/MailEndpointTest.java
  224. +0 −1  components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java
  225. +0 −1  components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java
  226. +0 −2  components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
  227. +0 −1  components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
  228. +0 −1  components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
  229. +0 −2  components/camel-netty/src/test/java/org/apache/camel/component/netty/NettyUDPLargeMessageInOnlyTest.java
  230. +1 −1  components/camel-ognl/pom.xml
  231. +0 −2  components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java
  232. +0 −2  components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java
  233. +0 −1  components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
  234. +0 −1  components/camel-quartz/src/main/java/org/apache/camel/routepolicy/quartz/ScheduledRouteDetails.java
  235. +0 −1  components/camel-quartz/src/test/java/org/apache/camel/component/quartz/QuartzRouteRestartTest.java
  236. +0 −2  components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/MultiplePoliciesOnRouteTest.java
  237. +0 −2  .../camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java
  238. +0 −2  ...nents/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SpringMultiplePoliciesOnRouteTest.java
  239. +1 −15 components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjComponent.java
  240. +6 −0 components/camel-quickfix/src/main/java/org/apache/camel/component/quickfixj/QuickfixjEndpoint.java
  241. +1 −1  ...el-quickfix/src/test/java/org/apache/camel/component/quickfixj/examples/trading/TradeExecutorComponent.java
  242. +0 −3  components/camel-restlet/src/main/java/org/apache/camel/component/restlet/RestletComponent.java
  243. +0 −1  components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletExceptionResponseTest.java
  244. +1 −0  components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiEndpoint.java
  245. +2 −0  components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxEndpoint.java
  246. +1 −0  components/camel-routebox/src/main/java/org/apache/camel/component/routebox/direct/RouteboxDirectEndpoint.java
  247. +0 −4 components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
  248. +5 −0 components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SLogProcessorTest.scala
  249. +0 −1  components/camel-shiro/src/main/java/org/apache/camel/component/shiro/security/ShiroSecurityPolicy.java
  250. +0 −3  components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthorizationTest.java
  251. +0 −2  components/camel-sip/src/test/java/org/apache/camel/component/sip/PublishSubscribeTest.java
  252. +0 −1  components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrComponentTestSupport.java
  253. +0 −1  components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrDeleteTest.java
  254. +0 −2  components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrServerMissingTest.java
  255. +0 −2  components/camel-solr/src/test/java/org/apache/camel/component/solr/SolrTransactionsTest.java
  256. +2 −0  ...ring-integration/src/main/java/org/apache/camel/component/spring/integration/SpringIntegrationEndpoint.java
  257. +1 −0  ...ation/src/main/java/org/apache/camel/component/spring/integration/converter/SpringIntegrationConverter.java
  258. +1 −1  components/camel-spring-integration/src/main/resources/META-INF/spring.schemas
  259. +0 −2  components/camel-spring-javaconfig/src/main/java/org/apache/camel/spring/javaconfig/CamelConfiguration.java
  260. +0 −4 components/camel-spring-javaconfig/src/main/java/org/apache/camel/spring/javaconfig/Main.java
  261. +0 −1  components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/MainTest.java
  262. +0 −1  ...el-spring-security/src/main/java/org/apache/camel/component/spring/security/SpringSecurityAccessPolicy.java
  263. +0 −1  ...ng-security/src/main/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicy.java
  264. +1 −1  components/camel-spring-security/src/main/resources/META-INF/spring.schemas
  265. +0 −1  ...ecurity/src/test/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicyTest.java
  266. +0 −1  ...est/java/org/apache/camel/component/spring/security/config/SpringSecurityAuthorizationPolicyConfigTest.java
  267. +0 −1  components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/StockQuoteResponseProcessor.java
  268. +0 −1  components/camel-spring/src/main/java/org/apache/camel/spring/spi/SpringTransactionPolicy.java
  269. +2 −2 components/camel-spring/src/main/resources/META-INF/spring.schemas
  270. +39 −0 components/camel-spring/src/test/java/org/apache/camel/language/SpringSimpleRegexTest.java
  271. +0 −1  components/camel-spring/src/test/java/org/apache/camel/spring/ApplicationContextTestSupport.java
  272. +0 −1  components/camel-spring/src/test/java/org/apache/camel/spring/DummyLifecycleStrategy.java
  273. +0 −1  components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java
  274. +44 −0 components/camel-spring/src/test/resources/org/apache/camel/language/springSimpleRegexContext.xml
  275. +6 −0 components/camel-spring/src/test/resources/org/apache/camel/spring/processor/logProcessorTest.xml
  276. +203 −0 ...nts/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/AbstractJdbcMessageIdRepository.java
  277. +22 −93 components/camel-sql/src/main/java/org/apache/camel/processor/idempotent/jdbc/JdbcMessageIdRepository.java
  278. +1 −0  components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamEndpoint.java
  279. +0 −1  components/camel-test/src/main/java/org/apache/camel/test/CamelSpringTestSupport.java
  280. +0 −3  components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelSpringTestSupport.java
  281. +0 −1  components/camel-test/src/test/java/org/apache/camel/test/patterns/DebugSpringCamelContextTest.java
  282. +0 −1  components/camel-testng/src/main/java/org/apache/camel/testng/CamelSpringTestSupport.java
  283. +0 −1  components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java
  284. +0 −1  components/camel-web/src/main/java/org/apache/camel/web/util/CamelOSGIResourceConfig.java
  285. +0 −5 components/camel-web/src/main/java/org/apache/camel/web/util/CamelResourceConfig.java
  286. +0 −1  components/camel-web/src/test/java/org/apache/camel/web/spring/CamelRouteTest.java
  287. +0 −1  components/camel-web/src/test/java/org/apache/camel/web/util/JMXRouteStatisticsTest.java
  288. +1 −0  components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
  289. +0 −1  components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java
  290. +0 −3  components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/SpringMarshalOmitFieldsTest.java
  291. +0 −4 ...onents/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamDataFormatOmitFieldsTest.java
  292. +6 −6 examples/camel-example-aggregate/src/main/resources/features.xml
  293. +4 −4 examples/camel-example-cafe/src/main/resources/features.xml
  294. +0 −1  examples/camel-example-cafe/src/test/java/org/apache/camel/example/cafe/CafeRouteSpringIntegrationTest.java
  295. +6 −3 ...camel-example-cxf-blueprint/src/main/java/org/apache/camel/example/reportincident/ReportIncidentRoutes.java
  296. +24 −11 ...ple-cxf-blueprint/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java
  297. +5 −1 examples/camel-example-cxf-blueprint/src/test/resources/camel-context.xml
  298. +2 −2 examples/camel-example-cxf-osgi/pom.xml
  299. +6 −3 ...ples/camel-example-cxf-osgi/src/main/java/org/apache/camel/example/reportincident/ReportIncidentRoutes.java
  300. +25 −11 ...-example-cxf-osgi/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesClientTest.java
Sorry, we could not display the entire diff because too many files (397) changed.
View
4 camel-core/src/main/java/org/apache/camel/CamelAuthorizationException.java
@@ -18,7 +18,9 @@
package org.apache.camel;
/**
- * An exception thrown for authorization errors occurring in a Camel exchange.
+ * An exception thrown for either authentication or authorization errors occurring
+ * in a Camel exchange. Intended to be used when a user is denied an action and
+ * Camel should not process the message as a result.
*
* @version
*/
View
11 camel-core/src/main/java/org/apache/camel/IsSingleton.java
@@ -17,9 +17,14 @@
package org.apache.camel;
/**
- * Used for defining if a given class is singleton or not.
- * If the class is a Singleton, then a single instance will be shared. Because the class is shared, it
- * should be treated as an immutable and be thread safe.
+ * Used for defining if a given class is singleton or not. If the class is a singleton,
+ * then a single instance will be shared (and hence should be treated as immutable and
+ * be used in a thread-safe manner.)
+ *
+ * This interface is not implemented as a marker interface (i.e., it's necessary to read
+ * isSingleton() instead of instanceof(IsSingleton)). This allows for subclasses to have
+ * a singleton status different from a parent and for objects to have this value dynamically
+ * changed.
*
* @version
*/
View
4 camel-core/src/main/java/org/apache/camel/MultipleConsumersSupport.java
@@ -33,9 +33,9 @@
public interface MultipleConsumersSupport {
/**
- * Is multiple consumers supported?
+ * Are multiple consumers supported?
*
- * @return <tt>true</tt> if multiple consumers is supported
+ * @return <tt>true</tt> if multiple consumers are supported
*/
boolean isMultipleConsumersSupported();
}
View
12 camel-core/src/main/java/org/apache/camel/api/management/PerformanceCounter.java
@@ -19,7 +19,7 @@
import org.apache.camel.Exchange;
/**
- * A counter that gathers performance metrics when {@link org.apache.camel.Exchange} are routed in Camel.
+ * A counter that gathers performance metrics when an {@link org.apache.camel.Exchange} is routed in Camel.
*
* @version
*/
@@ -29,7 +29,7 @@
* Executed when an {@link org.apache.camel.Exchange} is complete.
*
* @param exchange the exchange
- * @param time the time it took in millis to complete it
+ * @param time the time it took in millis to complete
*/
void completedExchange(Exchange exchange, long time);
@@ -41,20 +41,20 @@
void failedExchange(Exchange exchange);
/**
- * Is statistics enabled.
+ * Are statistics enabled?
* <p/>
* They can be enabled and disabled at runtime
*
- * @return whether statistics is enabled or not
+ * @return whether statistics are enabled or not
*/
boolean isStatisticsEnabled();
/**
- * Sets whether statistics is enabled.
+ * Sets whether statistics are enabled.
* <p/>
* They can be enabled and disabled at runtime
*
- * @param statisticsEnabled whether statistics is enabled or not
+ * @param statisticsEnabled whether statistics are enabled or not
*/
void setStatisticsEnabled(boolean statisticsEnabled);
View
4 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
@@ -24,7 +24,7 @@
public interface ManagedCamelContextMBean {
- @ManagedAttribute(description = "Camel id")
+ @ManagedAttribute(description = "Camel ID")
String getCamelId();
@ManagedAttribute(description = "Camel Version")
@@ -118,7 +118,7 @@
* @return <tt>true</tt> if a new endpoint was created, <tt>false</tt> if the endpoint already existed
* @throws Exception is thrown if error occurred
*/
- @ManagedOperation(description = "Creates the endpoint by the given uri")
+ @ManagedOperation(description = "Creates the endpoint by the given URI")
boolean createEndpoint(String uri) throws Exception;
/**
View
2  camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedComponentMBean.java
@@ -26,7 +26,7 @@
@ManagedAttribute(description = "Component State")
String getState();
- @ManagedAttribute(description = "Camel id")
+ @ManagedAttribute(description = "Camel ID")
String getCamelId();
}
View
2  camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedConsumerMBean.java
@@ -20,7 +20,7 @@
public interface ManagedConsumerMBean extends ManagedServiceMBean {
- @ManagedAttribute(description = "Endpoint Uri")
+ @ManagedAttribute(description = "Endpoint URI")
String getEndpointUri();
@ManagedAttribute(description = "Current number of inflight Exchanges")
View
4 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedEndpointMBean.java
@@ -20,10 +20,10 @@
public interface ManagedEndpointMBean {
- @ManagedAttribute(description = "Camel id")
+ @ManagedAttribute(description = "Camel ID")
String getCamelId();
- @ManagedAttribute(description = "Endpoint Uri")
+ @ManagedAttribute(description = "Endpoint URI")
String getEndpointUri();
@ManagedAttribute(description = "Singleton")
View
2  camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedErrorHandlerMBean.java
@@ -20,7 +20,7 @@
public interface ManagedErrorHandlerMBean {
- @ManagedAttribute(description = "Camel id")
+ @ManagedAttribute(description = "Camel ID")
String getCamelId();
@ManagedAttribute(description = "Does the error handler support redelivery")
View
6 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedProcessorMBean.java
@@ -24,13 +24,13 @@
@ManagedAttribute(description = "Processor State")
String getState();
- @ManagedAttribute(description = "Camel id")
+ @ManagedAttribute(description = "Camel ID")
String getCamelId();
- @ManagedAttribute(description = "Route id")
+ @ManagedAttribute(description = "Route ID")
String getRouteId();
- @ManagedAttribute(description = "Processor id")
+ @ManagedAttribute(description = "Processor ID")
String getProcessorId();
@ManagedOperation(description = "Start Processor")
View
2  camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedProducerMBean.java
@@ -20,7 +20,7 @@
public interface ManagedProducerMBean extends ManagedServiceMBean {
- @ManagedAttribute(description = "Endpoint Uri")
+ @ManagedAttribute(description = "Endpoint URI")
String getEndpointUri();
@ManagedAttribute(description = "Singleton")
View
6 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
@@ -21,13 +21,13 @@
public interface ManagedRouteMBean extends ManagedPerformanceCounterMBean {
- @ManagedAttribute(description = "Route id")
+ @ManagedAttribute(description = "Route ID")
String getRouteId();
@ManagedAttribute(description = "Route Description")
String getDescription();
- @ManagedAttribute(description = "Route Endpoint Uri")
+ @ManagedAttribute(description = "Route Endpoint URI")
String getEndpointUri();
@ManagedAttribute(description = "Route State")
@@ -36,7 +36,7 @@
@ManagedAttribute(description = "Current number of inflight Exchanges")
Integer getInflightExchanges();
- @ManagedAttribute(description = "Camel id")
+ @ManagedAttribute(description = "Camel ID")
String getCamelId();
@ManagedAttribute(description = "Tracing")
View
4 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedSendProcessorMBean.java
@@ -20,10 +20,10 @@
public interface ManagedSendProcessorMBean extends ManagedProcessorMBean {
- @ManagedAttribute(description = "Destination as Endpoint Uri")
+ @ManagedAttribute(description = "Destination as Endpoint URI")
String getDestination();
- @ManagedAttribute(description = "Destination as Endpoint Uri")
+ @ManagedAttribute(description = "Destination as Endpoint URI")
void setDestination(String uri);
@ManagedAttribute(description = "Message Exchange Pattern")
View
4 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedServiceMBean.java
@@ -24,10 +24,10 @@
@ManagedAttribute(description = "Service State")
String getState();
- @ManagedAttribute(description = "Camel id")
+ @ManagedAttribute(description = "Camel ID")
String getCamelId();
- @ManagedAttribute(description = "Route id")
+ @ManagedAttribute(description = "Route ID")
String getRouteId();
@ManagedOperation(description = "Start Service")
View
8 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedThreadPoolMBean.java
@@ -21,16 +21,16 @@
public interface ManagedThreadPoolMBean {
- @ManagedAttribute(description = "Thread Pool id")
+ @ManagedAttribute(description = "Thread Pool ID")
String getId();
- @ManagedAttribute(description = "Id of source for creating Thread Pool")
+ @ManagedAttribute(description = "ID of source for creating Thread Pool")
String getSourceId();
- @ManagedAttribute(description = "Route id for the source, which created the Thread Pool")
+ @ManagedAttribute(description = "Route ID for the source, which created the Thread Pool")
String getRouteId();
- @ManagedAttribute(description = "Id of the thread pool profile which this pool is based upon")
+ @ManagedAttribute(description = "ID of the thread pool profile which this pool is based upon")
String getThreadPoolProfileId();
@ManagedAttribute(description = "Core pool size")
View
22 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedTracerMBean.java
@@ -26,16 +26,16 @@
@ManagedAttribute(description = "Tracer enabled")
void setEnabled(boolean enabled);
- @ManagedAttribute(description = "Additional destination Uri")
+ @ManagedAttribute(description = "Additional destination URI")
String getDestinationUri();
- @ManagedAttribute(description = "Additional destination Uri")
+ @ManagedAttribute(description = "Additional destination URI")
void setDestinationUri(String uri);
@ManagedAttribute(description = "Logging Name")
String getLogName();
- @ManagedAttribute(description = "Using Jpa")
+ @ManagedAttribute(description = "Using JPA")
boolean getUseJpa();
@ManagedAttribute(description = "Logging Name")
@@ -101,10 +101,10 @@
@ManagedAttribute(description = "Formatter show breadcrumb")
void setFormatterShowBreadCrumb(boolean showBreadCrumb);
- @ManagedAttribute(description = "Formatter show exchange id")
+ @ManagedAttribute(description = "Formatter show exchange ID")
boolean getFormatterShowExchangeId();
- @ManagedAttribute(description = "Formatter show exchange id")
+ @ManagedAttribute(description = "Formatter show exchange ID")
void setFormatterShowExchangeId(boolean showExchangeId);
@ManagedAttribute(description = "Formatter show headers")
@@ -143,10 +143,10 @@
@ManagedAttribute(description = "Formatter show exception")
void setFormatterShowException(boolean showException);
- @ManagedAttribute(description = "Formatter show route id")
+ @ManagedAttribute(description = "Formatter show route ID")
boolean getFormatterShowRouteId();
- @ManagedAttribute(description = "Formatter show route id")
+ @ManagedAttribute(description = "Formatter show route ID")
void setFormatterShowRouteId(boolean showRouteId);
@ManagedAttribute(description = "Formatter breadcrumb length")
@@ -155,10 +155,10 @@
@ManagedAttribute(description = "Formatter breadcrumb length")
void setFormatterBreadCrumbLength(int breadCrumbLength);
- @ManagedAttribute(description = "Formatter show short exchange id")
+ @ManagedAttribute(description = "Formatter show short exchange ID")
boolean getFormatterShowShortExchangeId();
- @ManagedAttribute(description = "Formatter show short exchange id")
+ @ManagedAttribute(description = "Formatter show short exchange ID")
void setFormatterShowShortExchangeId(boolean showShortExchangeId);
@ManagedAttribute(description = "Formatter node length")
@@ -173,10 +173,10 @@
@ManagedAttribute(description = "Formatter max chars")
void setFormatterMaxChars(int maxChars);
- @ManagedAttribute(description = "Should trace events be sent as jmx notifications")
+ @ManagedAttribute(description = "Should trace events be sent as JMX notifications")
boolean isJmxTraceNotifications();
- @ManagedAttribute(description = "Should trace events be sent as jmx notifications")
+ @ManagedAttribute(description = "Should trace events be sent as JMX notifications")
void setJmxTraceNotifications(boolean jmxTraceNotifications);
@ManagedAttribute(description = "Maximum size of a message body for trace notification")
View
3  camel-core/src/main/java/org/apache/camel/api/management/package.html
@@ -19,7 +19,8 @@
</head>
<body>
-Service provider interfaces for management. These help making components management aware or to implement own management strategies
+Service provider interfaces for management. These help make components management-aware and
+also allow components to implement their own management strategies.
</body>
</html>
View
2  camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
@@ -219,7 +219,7 @@ public Object evaluate(Exchange exchange) {
Message out = exchange.getOut();
Object header = out.getHeader(headerName);
if (header == null) {
- // lets try the exchange header
+ // let's try the exchange header
header = exchange.getProperty(headerName);
}
return header;
View
2  camel-core/src/main/java/org/apache/camel/builder/xml/Namespaces.java
@@ -75,7 +75,7 @@ public Namespaces add(String prefix, String uri) {
}
public Namespaces add(Element element) {
- // lets set the parent first in case we overload a prefix here
+ // let's set the parent first in case we overload a prefix here
Node parentNode = element.getParentNode();
if (parentNode instanceof org.w3c.dom.Element) {
add((Element) parentNode);
View
6 camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java
@@ -93,7 +93,7 @@
// For some reason the default expression of "a/b" on a document such as
// <a><b>1</b><b>2</b></a>
// will evaluate as just "1" by default which is bizarre. So by default
- // lets assume XPath expressions result in nodesets.
+ // let's assume XPath expressions result in nodesets.
private Class<?> resultType;
private QName resultQName = XPathConstants.NODESET;
private String objectModelUri;
@@ -697,7 +697,7 @@ protected synchronized XPathExpression createXPathExpression() throws XPathExpre
}
/**
- * Lets populate a number of standard prefixes if they are not already there
+ * Populate a number of standard prefixes if they are not already there
*/
protected void populateDefaultNamespaces(DefaultNamespaceContext context) {
setNamespaceIfNotPresent(context, "in", IN_NAMESPACE);
@@ -802,7 +802,7 @@ protected Object getDocument(Exchange exchange, Object body) {
answer = body;
}
- // lets try coerce some common types into something JAXP can deal with
+ // let's try coercing some common types into something JAXP can work with
if (answer instanceof WrappedFile) {
// special for files so we can work with them out of the box
InputStream is = exchange.getContext().getTypeConverter().convertTo(InputStream.class, answer);
View
2  camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
@@ -103,7 +103,7 @@ public void process(Exchange exchange) throws Exception {
ResultHandler resultHandler = resultHandlerFactory.createResult(exchange);
Result result = resultHandler.getResult();
- // lets copy the headers before we invoke the transform in case they modify them
+ // let's copy the headers before we invoke the transform in case they modify them
Message out = exchange.getOut();
out.copyFrom(exchange.getIn());
View
18 camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
@@ -178,7 +178,7 @@ public MethodInvocation createInvocation(Object pojo, Exchange exchange)
} else if (methods != null) {
// there are more methods with that name so we cannot decide which to use
- // but first lets try to choose a method and see if that comply with the name
+ // but first let's try to choose a method and see if that complies with the name
// must use the method name which may have qualifiers
methodInfo = chooseMethod(pojo, exchange, methodName);
@@ -353,7 +353,7 @@ protected MethodInfo createMethodInfo(Class<?> clazz, Method method) {
// use exchange
expression = ExpressionBuilder.exchangeExpression();
} else {
- // lets assume its the body and it must be mandatory convertable to the parameter type
+ // assume it's the body and it must be mandatory convertible to the parameter type
// but we allow null bodies in case the message really contains a null body
expression = ExpressionBuilder.mandatoryBodyExpression(parameterType, true);
}
@@ -367,7 +367,7 @@ protected MethodInfo createMethodInfo(Class<?> clazz, Method method) {
LOG.trace("Parameter #{} has parameter info: ", i, parameterInfo);
}
- // now lets add the method to the repository
+ // now let's add the method to the repository
return new MethodInfo(camelContext, clazz, method, parameters, bodyParameters, hasCustomAnnotation, hasHandlerAnnotation);
}
@@ -400,14 +400,14 @@ protected void collectParameterAnnotations(Class<?> c, Method m, List<Annotation
}
/**
- * Lets try choose one of the available methods to invoke if we can match
+ * Choose one of the available methods to invoke if we can match
* the message body to the body parameter
*
* @param pojo the bean to invoke a method on
* @param exchange the message exchange
* @param name an optional name of the method that must match, use <tt>null</tt> to indicate all methods
* @return the method to invoke or null if no definitive method could be matched
- * @throws AmbiguousMethodCallException is thrown if cannot chose method due to ambiguous
+ * @throws AmbiguousMethodCallException is thrown if cannot choose method due to ambiguity
*/
protected MethodInfo chooseMethod(Object pojo, Exchange exchange, String name) throws AmbiguousMethodCallException {
// @Handler should be select first
@@ -470,7 +470,7 @@ protected MethodInfo chooseMethod(Object pojo, Exchange exchange, String name) t
private MethodInfo chooseMethodWithMatchingBody(Exchange exchange, Collection<MethodInfo> operationList,
List<MethodInfo> operationsWithCustomAnnotation)
throws AmbiguousMethodCallException {
- // lets see if we can find a method who's body param type matches the message body
+ // see if we can find a method whose body param type matches the message body
Message in = exchange.getIn();
Object body = in.getBody();
if (body != null) {
@@ -525,7 +525,7 @@ private MethodInfo chooseBestPossibleMethodInfo(Exchange exchange, Collection<Me
} else if (possibles.isEmpty()) {
LOG.trace("No possible methods so now trying to convert body to parameter types");
- // lets try converting
+ // let's try converting
Object newBody = null;
MethodInfo matched = null;
int matchCounter = 0;
@@ -555,7 +555,7 @@ private MethodInfo chooseBestPossibleMethodInfo(Exchange exchange, Collection<Me
return matched;
}
} else {
- // if we only have a single method with custom annotations, lets use that one
+ // if we only have a single method with custom annotations, let's use that one
if (possibleWithCustomAnnotation.size() == 1) {
MethodInfo answer = possibleWithCustomAnnotation.get(0);
LOG.trace("There are only one method with annotations so we choose it: {}", answer);
@@ -621,7 +621,7 @@ private MethodInfo overridesExistingMethod(MethodInfo methodInfo) {
private MethodInfo chooseMethodWithCustomAnnotations(Exchange exchange, Collection<MethodInfo> possibles)
throws AmbiguousMethodCallException {
- // if we have only one method with custom annotations lets choose that
+ // if we have only one method with custom annotations let's choose that
MethodInfo chosen = null;
for (MethodInfo possible : possibles) {
if (possible.hasCustomAnnotation()) {
View
2  camel-core/src/main/java/org/apache/camel/component/bean/BeanProcessor.java
@@ -175,7 +175,7 @@ public boolean process(Exchange exchange, AsyncCallback callback) {
LOG.trace("Processing exchangeId: {} is continued being processed synchronously", exchange.getExchangeId());
} catch (InvocationTargetException e) {
- // lets unwrap the exception when its an invocation target exception
+ // let's unwrap the exception when it's an invocation target exception
exchange.setException(e.getCause());
callback.done(true);
return true;
View
2  camel-core/src/main/java/org/apache/camel/component/bean/DefaultAnnotationExpressionFactory.java
@@ -46,7 +46,7 @@ public Expression createExpression(CamelContext camelContext, Annotation annotat
}
protected String getExpressionFromAnnotation(Annotation annotation) {
- // lets try the 'value()' method
+ // let's try the 'value()' method
try {
Method method = annotation.getClass().getMethod("value");
Object value = ObjectHelper.invokeMethod(method, annotation);
View
6 camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
@@ -542,7 +542,7 @@ protected Pattern findOneWayAnnotation(Method method) {
if (answer == null) {
Class<?> type = method.getDeclaringClass();
- // lets create the search order of types to scan
+ // create the search order of types to scan
List<Class<?>> typesToSearch = new ArrayList<Class<?>>();
addTypeAndSuperTypes(type, typesToSearch);
Class<?>[] interfaces = type.getInterfaces();
@@ -550,7 +550,7 @@ protected Pattern findOneWayAnnotation(Method method) {
addTypeAndSuperTypes(anInterface, typesToSearch);
}
- // now lets scan for a type which the current declared class overloads
+ // now let's scan for a type which the current declared class overloads
answer = findOneWayAnnotationOnMethod(typesToSearch, method);
if (answer == null) {
answer = findOneWayAnnotation(typesToSearch);
@@ -583,7 +583,7 @@ protected Pattern getPatternAnnotation(AnnotatedElement annotatedElement, int de
int nextDepth = depth - 1;
if (nextDepth > 0) {
- // lets look at all the annotations to see if any of those are annotated
+ // look at all the annotations to see if any of those are annotated
Annotation[] annotations = annotatedElement.getAnnotations();
for (Annotation annotation : annotations) {
Class<? extends Annotation> annotationType = annotation.annotationType();
View
2  camel-core/src/main/java/org/apache/camel/component/browse/BrowseEndpoint.java
@@ -85,7 +85,7 @@ public Consumer createConsumer(Processor processor) throws Exception {
protected void onExchange(Exchange exchange) throws Exception {
getExchanges().add(exchange);
- // lets fire any consumers
+ // now fire any consumers
loadBalancer.process(exchange);
}
View
2  camel-core/src/main/java/org/apache/camel/component/dataset/DataSetEndpoint.java
@@ -184,7 +184,7 @@ protected void performAssertions(Exchange actual, Exchange copy) throws Exceptio
long index = receivedCount - 1;
Exchange expected = createExchange(index);
- // now lets assert that they are the same
+ // now let's assert that they are the same
if (log.isDebugEnabled()) {
log.debug("Received message: {} (DataSet index={}) = {}",
new Object[]{index, copy.getIn().getHeader(Exchange.DATASET_INDEX, Integer.class), copy});
View
2  camel-core/src/main/java/org/apache/camel/component/dataset/DataSetSupport.java
@@ -57,7 +57,7 @@ public void assertMessageExpected(DataSetEndpoint dataSetEndpoint, Exchange expe
Object expectedBody = expected.getIn().getBody();
Object actualBody = actual.getIn().getBody();
if (expectedBody != null) {
- // lets coerce to the correct type
+ // let's coerce to the correct type
actualBody = ExchangeHelper.getMandatoryInBody(actual, expectedBody.getClass());
}
DataSetEndpoint.assertEquals("message body", expectedBody, actualBody, actual);
View
2  camel-core/src/main/java/org/apache/camel/component/file/GenericFileProducer.java
@@ -197,7 +197,7 @@ protected void processExchange(Exchange exchange, String target) throws Exceptio
writeFile(empty, doneFileName);
}
- // lets store the name we really used in the header, so end-users
+ // let's store the name we really used in the header, so end-users
// can retrieve it
exchange.getIn().setHeader(Exchange.FILE_NAME_PRODUCED, target);
} catch (Exception e) {
View
2  camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
@@ -1144,7 +1144,7 @@ protected void waitForCompleteLatch(long timeout) throws InterruptedException {
// Wait for a default 10 seconds if resultWaitTime is not set
long waitTime = timeout == 0 ? 10000L : timeout;
- // now lets wait for the results
+ // now let's wait for the results
LOG.debug("Waiting on the latch for: " + timeout + " millis");
latch.await(waitTime, TimeUnit.MILLISECONDS);
}
View
2  camel-core/src/main/java/org/apache/camel/component/ref/RefComponent.java
@@ -30,7 +30,7 @@
public class RefComponent extends DefaultComponent {
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
- // lets remove the scheme from the URI
+ // first remove the scheme from the URI
int index = uri.indexOf(':');
String name = uri;
if (index >= 0) {
View
19 camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
@@ -155,9 +155,8 @@ protected void doRun() {
if (exchange != null) {
try {
// send a new copied exchange with new camel context
- Exchange newExchange = ExchangeHelper.copyExchangeAndSetCamelContext(exchange, endpoint.getCamelContext());
- // set the fromEndpoint
- newExchange.setFromEndpoint(endpoint);
+ Exchange newExchange = prepareExchange(exchange);
+ // process the exchange
sendToConsumers(newExchange);
// copy the message back
if (newExchange.hasOut()) {
@@ -195,6 +194,20 @@ protected void doRun() {
}
/**
+ * Strategy to prepare exchange for being processed by this consumer
+ *
+ * @param exchange the exchange
+ * @return the exchange to process by this consumer.
+ */
+ protected Exchange prepareExchange(Exchange exchange) {
+ // send a new copied exchange with new camel context
+ Exchange newExchange = ExchangeHelper.copyExchangeAndSetCamelContext(exchange, endpoint.getCamelContext());
+ // set the from endpoint
+ newExchange.setFromEndpoint(endpoint);
+ return newExchange;
+ }
+
+ /**
* Send the given {@link Exchange} to the consumer(s).
* <p/>
* If multiple consumers then they will each receive a copy of the Exchange.
View
10 camel-core/src/main/java/org/apache/camel/converter/IOConverter.java
@@ -154,6 +154,16 @@ public static InputStream toInputStream(String text, Exchange exchange) throws I
return toInputStream(text.getBytes(IOHelper.getCharsetName(exchange)));
}
+ @Converter
+ public static InputStream toInputStream(StringBuffer buffer, Exchange exchange) throws IOException {
+ return toInputStream(buffer.toString(), exchange);
+ }
+
+ @Converter
+ public static InputStream toInputStream(StringBuilder builder, Exchange exchange) throws IOException {
+ return toInputStream(builder.toString(), exchange);
+ }
+
/**
* @deprecated will be removed in Camel 3.0. Use the method which has 2 parameters.
*/
View
4 camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -1994,7 +1994,7 @@ private boolean doCheckMultipleConsumerSupportClash(Endpoint endpoint, List<Endp
}
/**
- * Lets force some lazy initialization to occur upfront before we start any
+ * Force some lazy initialization to occur upfront before we start any
* components and create routes
*/
protected void forceLazyInitialization() {
@@ -2005,7 +2005,7 @@ protected void forceLazyInitialization() {
}
/**
- * Lets force clear lazy initialization so they can be re-created on restart
+ * Force clear lazy initialization so they can be re-created on restart
*/
protected void forceStopLazyInitialization() {
injector = null;
View
1  camel-core/src/main/java/org/apache/camel/impl/DefaultEndpoint.java
@@ -19,7 +19,6 @@
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.net.URI;
-import java.net.URISyntaxException;
import java.util.Map;
import org.apache.camel.CamelContext;
View
2  camel-core/src/main/java/org/apache/camel/impl/MappedEndpointConfiguration.java
@@ -21,10 +21,8 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
-import org.apache.camel.CamelContext;
import org.apache.camel.Component;
import org.apache.camel.EndpointConfiguration;
import org.apache.camel.TypeConverter;
View
2  camel-core/src/main/java/org/apache/camel/impl/MessageSupport.java
@@ -185,7 +185,7 @@ public void setMessageId(String messageId) {
}
/**
- * Lets allow implementations to auto-create a messageId
+ * Allow implementations to auto-create a messageId
*/
protected String createMessageId() {
String uuid = null;
View
8 camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
@@ -173,14 +173,18 @@ public void shutdown() throws Exception {
if (!context.getStatus().isStarted()) {
throw new IllegalArgumentException("CamelContext is not started");
}
- context.shutdownRoute(getRouteId());
+ String routeId = getRouteId();
+ context.stopRoute(routeId);
+ context.removeRoute(routeId);
}
public void shutdown(long timeout) throws Exception {
if (!context.getStatus().isStarted()) {
throw new IllegalArgumentException("CamelContext is not started");
}
- context.shutdownRoute(getRouteId(), timeout, TimeUnit.SECONDS);
+ String routeId = getRouteId();
+ context.stopRoute(routeId, timeout, TimeUnit.SECONDS);
+ context.removeRoute(routeId);
}
public boolean remove() throws Exception {
View
1  camel-core/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java
@@ -20,7 +20,6 @@
import java.util.List;
import org.apache.camel.CamelContext;
-import org.apache.camel.ErrorHandlerFactory;
import org.apache.camel.util.CamelContextHelper;
import org.apache.camel.util.EndpointHelper;
import org.apache.camel.util.ObjectHelper;
View
1  camel-core/src/main/java/org/apache/camel/model/language/ExpressionDefinition.java
@@ -33,7 +33,6 @@
import org.apache.camel.Exchange;
import org.apache.camel.Expression;
import org.apache.camel.Predicate;
-import org.apache.camel.builder.PredicateBuilder;
import org.apache.camel.spi.Language;
import org.apache.camel.spi.Required;
import org.apache.camel.spi.RouteContext;
View
1  camel-core/src/main/java/org/apache/camel/model/language/MethodCallExpression.java
@@ -31,7 +31,6 @@
import org.apache.camel.component.bean.MethodNotFoundException;
import org.apache.camel.component.bean.RegistryBean;
import org.apache.camel.language.bean.BeanExpression;
-import org.apache.camel.util.CamelContextHelper;
import org.apache.camel.util.ObjectHelper;
import org.apache.camel.util.OgnlHelper;
View
6 camel-core/src/main/java/org/apache/camel/processor/LogProcessor.java
@@ -46,8 +46,10 @@ public void process(Exchange exchange) throws Exception {
@Override
public boolean process(Exchange exchange, AsyncCallback callback) {
try {
- String msg = expression.evaluate(exchange, String.class);
- logger.log(msg);
+ if (logger.shouldLog()) {
+ String msg = expression.evaluate(exchange, String.class);
+ logger.doLog(msg);
+ }
} catch (Exception e) {
exchange.setException(e);
} finally {
View
2  camel-core/src/main/java/org/apache/camel/processor/Resequencer.java
@@ -17,7 +17,6 @@
package org.apache.camel.processor;
import java.util.Comparator;
-import java.util.List;
import java.util.Set;
import java.util.TreeSet;
@@ -27,7 +26,6 @@
import org.apache.camel.Processor;
import org.apache.camel.Traceable;
import org.apache.camel.util.ExpressionComparator;
-import org.apache.camel.util.ExpressionListComparator;
/**
* An implementation of the <a href="http://camel.apache.org/resequencer.html">Resequencer</a>
View
1  camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptor.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.processor.interceptor;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
View
1  camel-core/src/main/java/org/apache/camel/processor/resequencer/ResequencerEngine.java
@@ -18,7 +18,6 @@
import java.util.Timer;
-import org.apache.camel.CamelExchangeException;
import org.apache.camel.util.concurrent.ThreadHelper;
/**
View
2  camel-core/src/main/java/org/apache/camel/spi/RouteContext.java
@@ -97,7 +97,7 @@
<T> Map<String, T> lookupByType(Class<T> type);
/**
- * Lets complete the route creation, creating a single event driven route
+ * For completing the route creation, creating a single event driven route
* for the current from endpoint with any processors required
*/
void commit();
View
1  camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java
@@ -24,7 +24,6 @@
import org.apache.camel.Exchange;
import org.apache.camel.InvalidPayloadException;
-import org.apache.camel.Predicate;
import org.apache.camel.util.IOHelper;
import org.apache.camel.util.ObjectHelper;
View
16 camel-core/src/main/java/org/apache/camel/util/CamelLogger.java
@@ -79,13 +79,27 @@ public void log(String message, LoggingLevel loggingLevel) {
log(message);
setLevel(oldLogLevel);
}
-
+
+ /**
+ * Logs the message <b>with</b> checking the {@link #shouldLog()} method first.
+ *
+ * @param message the message to log, if {@link #shouldLog()} returned <tt>true</tt>
+ */
public void log(String message) {
if (shouldLog(log, level)) {
log(log, level, marker, message);
}
}
+ /**
+ * Logs the message <b>without</b> checking the {@link #shouldLog()} method first.
+ *
+ * @param message the message to log
+ */
+ public void doLog(String message) {
+ log(log, level, marker, message);
+ }
+
public void log(String message, Throwable exception, LoggingLevel loggingLevel) {
log(log, loggingLevel, marker, message, exception);
}
View
4 camel-core/src/main/java/org/apache/camel/util/ExpressionComparator.java
@@ -22,8 +22,8 @@
import org.apache.camel.Expression;
/**
- * An implementation of {@link Comparator} which takes an {@link Expression} which is evaluated
- * on each exchange to compare
+ * An implementation of {@link Comparator} that takes an {@link Expression} which is evaluated
+ * on each exchange to be compared
*
* @version
*/
View
2  camel-core/src/main/java/org/apache/camel/util/LRUSoftCache.java
@@ -27,7 +27,7 @@
* A Least Recently Used Cache which uses {@link SoftReference}.
* <p/>
* This implementation uses {@link java.lang.ref.SoftReference} for stored values in the cache, to support the JVM
- * when it wants to reclaim objects when its running out of memory. Therefore this implementation does
+ * when it wants to reclaim objects when it's running out of memory. Therefore this implementation does
* not support <b>all</b> the {@link java.util.Map} methods.
* <p/>
* The following methods is <b>only</b> be be used:
View
20 camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
@@ -69,9 +69,9 @@ private ObjectHelper() {
}
/**
- * A helper method for comparing objects for equality in which it uses type coerce to coerce
- * types between the left and right values. This allows you to equal test eg String and Integer as
- * Camel will be able to coerce the types.
+ * A helper method for comparing objects for equality in which it uses type coercion to coerce
+ * types between the left and right values. This allows you test for equality for example with
+ * a String and Integer type as Camel will be able to coerce the types.
*/
public static boolean typeCoerceEquals(TypeConverter converter, Object leftValue, Object rightValue) {
// sanity check
@@ -108,18 +108,18 @@ public static boolean typeCoerceEquals(TypeConverter converter, Object leftValue
}
/**
- * A helper method for comparing objects for equality in which it uses type coerce to coerce
- * types between the left and right values. This allows you to equal test eg String and Integer as
- * Camel will be able to coerce the types
+ * A helper method for comparing objects for inequality in which it uses type coercion to coerce
+ * types between the left and right values. This allows you test for inequality for example with
+ * a String and Integer type as Camel will be able to coerce the types.
*/
public static boolean typeCoerceNotEquals(TypeConverter converter, Object leftValue, Object rightValue) {
return !typeCoerceEquals(converter, leftValue, rightValue);
}
/**
- * A helper method for comparing objects ordering in which it uses type coerce to coerce
- * types between the left and right values. This allows you to equal test eg String and Integer as
- * Camel will be able to coerce the types
+ * A helper method for comparing objects ordering in which it uses type coercion to coerce
+ * types between the left and right values. This allows you test for ordering for example with
+ * a String and Integer type as Camel will be able to coerce the types.
*/
@SuppressWarnings({"unchecked", "rawtypes"})
public static int typeCoerceCompare(TypeConverter converter, Object leftValue, Object rightValue) {
@@ -1214,7 +1214,7 @@ public static CamelExecutionException wrapCamelExecutionException(Exchange excha
}
/**
- * Cleans the string to pure java identifier so we can use it for loading class names.
+ * Cleans the string to a pure Java identifier so we can use it for loading class names.
* <p/>
* Especially from Spring DSL people can have \n \t or other characters that otherwise
* would result in ClassNotFoundException
View
14 camel-core/src/main/java/org/apache/camel/util/OgnlHelper.java
@@ -22,7 +22,7 @@
import java.util.regex.Pattern;
/**
- * Helper for Camel OGNL expressions.
+ * Helper for Camel OGNL (Object-Graph Navigation Language) expressions.
*
* @version
*/
@@ -36,17 +36,17 @@ private OgnlHelper() {
/**
* Tests whether or not the given String is a Camel OGNL expression.
* <p/>
- * Its consider Camel OGNL expression when it contains either one of the following chars: . or [
+ * An expression is considered an OGNL expression when it contains either one of the following chars: . or [
*
* @param expression the String
- * @return <tt>true</tt> if Camel OGNL expression, otherwise <tt>false</tt>.
+ * @return <tt>true</tt> if a Camel OGNL expression, otherwise <tt>false</tt>.
*/
public static boolean isValidOgnlExpression(String expression) {
if (ObjectHelper.isEmpty(expression)) {
return false;
}
- // the brackets should come in pair
+ // the brackets should come in a pair
int bracketBegin = StringHelper.countChar(expression, '[');
int bracketEnd = StringHelper.countChar(expression, ']');
if (bracketBegin > 0 && bracketEnd > 0) {
@@ -81,10 +81,10 @@ public static boolean isInvalidValidOgnlExpression(String expression) {
}
/**
- * Tests whether or not the given Camel OGNL expression is using the elvis operator or not.
+ * Tests whether or not the given Camel OGNL expression is using the Elvis operator or not.
*
* @param ognlExpression the Camel OGNL expression
- * @return <tt>true</tt> if the elvis operator is used, otherwise <tt>false</tt>.
+ * @return <tt>true</tt> if the Elvis operator is used, otherwise <tt>false</tt>.
*/
public static boolean isNullSafeOperator(String ognlExpression) {
if (ObjectHelper.isEmpty(ognlExpression)) {
@@ -163,7 +163,7 @@ public static String removeOperators(String ognlExpression) {
/**
* Regular expression with repeating groups is a pain to get right
* and then nobody understands the reg exp afterwards.
- * So use a bit ugly/low-level java code to split the ognl into methods.
+ * So we use a bit ugly/low-level Java code to split the OGNL into methods.
*/
public static List<String> splitOgnl(String ognl) {
List<String> methods = new ArrayList<String>();
View
10 camel-core/src/main/java/org/apache/camel/util/PackageHelper.java
@@ -34,12 +34,12 @@ private PackageHelper() {
/**
* Returns true if the version number of the given package name can be found and is greater than or equal to the minimum version.
*
- * For package names which include multiple dots, the dots are removed. So for example a spring version of 2.5.1 is converted to
- * 2.51 so you can assert that its >= 2.51 (so above 2.50 and less than 2.52 etc).
+ * For package names which include multiple dots, dots after the leftmost are removed. So for example a spring version of 2.5.1
+ * is converted to 2.51 so you can assert that it's >= 2.51 (so above 2.50 and less than 2.52 etc).
*
* @param packageName the Java package name to compare
* @param minimumVersion the minimum version number
- * @return true if the package name can be determined and if its greater than or equal to the minimum value
+ * @return true if the package name can be determined and if it's greater than or equal to the minimum value
*/
public static boolean isValidVersion(String packageName, double minimumVersion) {
try {
@@ -65,13 +65,13 @@ public static boolean isValidVersion(String packageName, double minimumVersion)
double number = Double.parseDouble(value);
return number >= minimumVersion;
} else {
- LOG.debug("Failed to find out version from package: " + packageName);
+ LOG.debug("Could not determine version of package: " + packageName);
}
}
}
} catch (Exception e) {
if (LOG.isDebugEnabled()) {
- LOG.debug("Failed to find out version from package: " + packageName, e);
+ LOG.debug("Could not determine version of package: " + packageName, e);
}
}
View
2  camel-core/src/main/java/org/apache/camel/util/PredicateAssertHelper.java
@@ -36,7 +36,7 @@ public static void assertMatches(Predicate predicate, String text, Exchange exch
ObjectHelper.notNull(exchange, "exchange");
if (predicate instanceof BinaryPredicate) {
- // special for binary evaluable as we can get more detailed information
+ // with binary evaluations as we can get more detailed information
BinaryPredicate eval = (BinaryPredicate) predicate;
String evalText = eval.matchesReturningFailureMessage(exchange);
if (evalText != null) {
View
19 camel-core/src/main/java/org/apache/camel/util/ResourceHelper.java
@@ -29,7 +29,7 @@
import org.apache.camel.spi.ClassResolver;
/**
- * Helper for loading resources on the classpath or file system.
+ * Helper class for loading resources on the classpath or file system.
*/
public final class ResourceHelper {
@@ -38,10 +38,10 @@ private ResourceHelper() {
}
/**
- * Determines whether the uri has a scheme (eg file:, classpath: or http:)
+ * Determines whether the URI has a scheme (e.g. file:, classpath: or http:)
*
- * @param uri the uri
- * @return <tt>true</tt> if the uri starts with a scheme
+ * @param uri the URI
+ * @return <tt>true</tt> if the URI starts with a scheme
*/
public static boolean hasScheme(String uri) {
if (uri == null) {
@@ -54,12 +54,11 @@ public static boolean hasScheme(String uri) {
/**
* Resolves the mandatory resource.
* <p/>
- * If possible prefer to use {@link #resolveMandatoryResourceAsUrl(org.apache.camel.spi.ClassResolver, String)}
- * if possible.
+ * If possible recommended to use {@link #resolveMandatoryResourceAsUrl(org.apache.camel.spi.ClassResolver, String)}
*
* @param classResolver the class resolver to load the resource from the classpath
- * @param uri uri of the resource
- * @return the resource as an {@link InputStream}, remember to close the stream after usage.
+ * @param uri URI of the resource
+ * @return the resource as an {@link InputStream}. Remember to close this stream after usage.
* @throws java.io.IOException is thrown if the resource file could not be found or loaded as {@link InputStream}
*/
public static InputStream resolveMandatoryResourceAsInputStream(ClassResolver classResolver, String uri) throws IOException {
@@ -98,9 +97,9 @@ public static InputStream resolveMandatoryResourceAsInputStream(ClassResolver cl
*
* @param classResolver the class resolver to load the resource from the classpath
* @param uri uri of the resource
- * @return the resource as an {@link InputStream}, remember to close the stream after usage.
+ * @return the resource as an {@link InputStream}. Remember to close this stream after usage.
* @throws java.io.FileNotFoundException is thrown if the resource file could not be found
- * @throws java.net.MalformedURLException if the uri is malformed
+ * @throws java.net.MalformedURLException if the URI is malformed
*/
public static URL resolveMandatoryResourceAsUrl(ClassResolver classResolver, String uri) throws FileNotFoundException, MalformedURLException {
if (uri.startsWith("file:")) {
View
2  camel-core/src/main/java/org/apache/camel/util/package.html
@@ -19,7 +19,7 @@
</head>
<body>
-Utility classes used by the core of Camel and useful for Camel component developers
+Utility classes used by the core of Camel. Also useful for Camel component developers.
</body>
</html>
View
2  camel-core/src/main/java/org/apache/camel/view/NodeData.java
@@ -171,7 +171,7 @@ protected String removeQueryString(String text) {
}
/**
- * Lets insert a space before each upper case letter after a lowercase
+ * Inserts a space before each upper case letter after a lowercase
*/
public static String insertSpacesBetweenCamelCase(String name) {
boolean lastCharacterLowerCase = false;
View
1  camel-core/src/test/java/org/apache/camel/component/file/GenericFileConverterTest.java
@@ -18,7 +18,6 @@
import java.io.BufferedInputStream;
import java.io.File;
-import java.io.FileInputStream;
import java.io.InputStream;
import java.io.Serializable;
View
58 camel-core/src/test/java/org/apache/camel/component/seda/SedaFromRouteIdTest.java
@@ -0,0 +1,58 @@
+/**
+ * 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.component.seda;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+
+/**
+ *
+ */
+public class SedaFromRouteIdTest extends ContextTestSupport {
+
+ public void testSedaFromRouteId() throws Exception {
+ MockEndpoint foo = getMockEndpoint("mock:foo");
+ foo.expectedMessageCount(1);
+
+ MockEndpoint bar = getMockEndpoint("mock:bar");
+ bar.expectedMessageCount(1);
+
+ template.sendBody("seda:foo", "Hello World");
+
+ assertMockEndpointsSatisfied();
+
+ assertEquals("foo", foo.getReceivedExchanges().get(0).getFromRouteId());
+ assertEquals("seda://foo", foo.getReceivedExchanges().get(0).getFromEndpoint().getEndpointUri());
+ assertEquals("bar", bar.getReceivedExchanges().get(0).getFromRouteId());
+ assertEquals("seda://bar", bar.getReceivedExchanges().get(0).getFromEndpoint().getEndpointUri());
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("seda:foo").routeId("foo")
+ .to("mock:foo").to("seda:bar");
+
+ from("seda:bar").routeId("bar")
+ .to("mock:bar");
+ }
+ };
+ }
+}
View
2  camel-core/src/test/java/org/apache/camel/component/vm/VMSplitterTest.java
@@ -23,8 +23,6 @@
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.impl.JndiRegistry;
-import org.apache.camel.model.language.MethodCallExpression;
-import org.apache.camel.processor.SplitterMethodCallTest.SplitWordsBean;
public class VMSplitterTest extends AbstractVmTestSupport {
View
2  camel-core/src/test/java/org/apache/camel/component/xslt/XsltFileNotFoundTest.java
@@ -17,8 +17,6 @@
package org.apache.camel.component.xslt;
import java.io.FileNotFoundException;
-import javax.xml.transform.TransformerConfigurationException;
-
import org.apache.camel.CamelContext;
import org.apache.camel.FailedToCreateRouteException;
import org.apache.camel.ResolveEndpointFailedException;
View
17 camel-core/src/test/java/org/apache/camel/converter/IOConverterTest.java
@@ -103,6 +103,23 @@ public void testToInputStreamExchange() throws Exception {
InputStream is = IOConverter.toInputStream("Hello World", exchange);
assertNotNull(is);
+ assertEquals("Hello World", IOConverter.toString(is, exchange));
+ }
+
+ public void testToInputStreamStringBufferAndBuilderExchange() throws Exception {
+ Exchange exchange = new DefaultExchange(context);
+ exchange.setProperty(Exchange.CHARSET_NAME, ObjectHelper.getDefaultCharacterSet());
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("Hello World");
+ InputStream is = IOConverter.toInputStream(buffer, exchange);
+ assertNotNull(is);
+ assertEquals("Hello World", IOConverter.toString(is, exchange));
+
+ StringBuilder builder = new StringBuilder();
+ builder.append("Hello World");
+ is = IOConverter.toInputStream(builder, exchange);
+ assertNotNull(is);
+ assertEquals("Hello World", IOConverter.toString(is, exchange));
}
public void testToInputStreamBufferReader() throws Exception {
View
8 camel-core/src/test/java/org/apache/camel/language/simple/SimpleParserPredicateTest.java
@@ -177,5 +177,13 @@ public void testSimpleManyOrLogical() throws Exception {
assertTrue("Should match", pre.matches(exchange));
}
+
+ public void testSimpleExpressionPredicate() throws Exception {
+ exchange.getIn().setBody("Hello");
+ exchange.getIn().setHeader("number", "1234");
+ SimplePredicateParser parser = new SimplePredicateParser("${in.header.number} regex '\\d{4}'");
+ Predicate pre = parser.parsePredicate();
+ assertTrue("Should match", pre.matches(exchange));
+ }
}
View
3  camel-core/src/test/java/org/apache/camel/language/simple/SimpleParserRegexpPredicateTest.java
@@ -32,6 +32,9 @@ public void testSimpleRegexp() throws Exception {
Predicate pre = parser.parsePredicate();
assertTrue(pre.matches(exchange));
+
+ exchange.getIn().setBody("12.2a.22ab");
+ assertFalse(pre.matches(exchange));
}
}
View
10 camel-core/src/test/java/org/apache/camel/processor/LogProcessorTest.java
@@ -57,6 +57,14 @@ public void testLogProcessorMarker() throws Exception {
assertMockEndpointsSatisfied();
}
+ public void testNoLog() throws Exception {
+ getMockEndpoint("mock:bar").expectedMessageCount(1);
+
+ template.sendBody("direct:nolog", "Hi World");
+
+ assertMockEndpointsSatisfied();
+ }
+
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@@ -71,6 +79,8 @@ public void configure() throws Exception {
from("direct:wombat").routeId("wombat")
.log(LoggingLevel.INFO, "cool", "mymarker", "Me got ${body}")
.to("mock:wombat");
+
+ from("direct:nolog").routeId("nolog").log(LoggingLevel.TRACE, "Should not log ${body}").to("mock:bar");
}
};
}
View
68 camel-core/src/test/java/org/apache/camel/processor/SplitterPropertyContinuedTest.java
@@ -0,0 +1,68 @@
+/**
+ * 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.processor;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ *
+ */
+public class SplitterPropertyContinuedTest extends ContextTestSupport {
+
+ public void testSplitterPropertyContinued() throws Exception {
+ getMockEndpoint("mock:end").expectedBodiesReceived("A,Kaboom,B,C");
+ getMockEndpoint("mock:end").message(0).property("errorCode").isNull();
+ getMockEndpoint("mock:error").expectedBodiesReceived("Kaboom");
+ getMockEndpoint("mock:error").message(0).property("errorCode").isEqualTo("ERR-1");
+ getMockEndpoint("mock:split").expectedBodiesReceived("A", "B", "C");
+ getMockEndpoint("mock:split").allMessages().property("errorCode").isNull();
+
+ template.sendBody("direct:start", "A,Kaboom,B,C");
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ onException(Exception.class)
+ .continued(true)
+ .setProperty("errorCode", constant("ERR-1"));
+
+ from("direct:start")
+ .split(body())
+ .log("Step #1 - Body: ${body} with error code: ${property.errorCode}")
+ .choice()
+ .when(body().contains("Kaboom"))
+ .throwException(new IllegalArgumentException("Damn"))
+ .end()
+ .log("Step #2 - Body: ${body} with error code: ${property.errorCode}")
+ .choice()
+ .when(simple("${property.errorCode} != null"))
+ .to("mock:error")
+ .otherwise()
+ .to("mock:split")
+ .end()
+ .end()
+ .to("mock:end");
+ }
+ };
+ }
+}
View
1  camel-core/src/test/java/org/apache/camel/processor/aggregator/AggregateForceCompletionHeaderTest.java
@@ -19,7 +19,6 @@
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.processor.BodyInAggregatingStrategy;
import org.apache.camel.processor.aggregate.AggregationStrategy;
import org.junit.Test;
View
1  components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java
@@ -26,7 +26,6 @@
import org.apache.camel.impl.DefaultEndpoint;
import org.apache.camel.spi.HeaderFilterStrategy;
import org.apache.camel.spi.HeaderFilterStrategyAware;
-import org.apache.camel.util.IOHelper;
import org.apache.camel.util.ObjectHelper;
import org.apache.camel.util.jsse.SSLContextParameters;
View
1  components/camel-ahc/src/main/java/org/apache/camel/component/ahc/DefaultAhcBinding.java
<
@@ -40,7 +40,6 @@
import org.apache.camel.Message;
import org.apache.camel.component.ahc.helper.AhcHelper;
import org.apache.camel.component.file.GenericFile;
-import org.apache.camel.converter.IOConverter;