You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2018/11/08 15:00:21 UTC
[camel] 07/08: Merge remote-tracking branch 'origin/master' into
camel-3.x
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch sandbox/camel-3.x
in repository https://gitbox.apache.org/repos/asf/camel.git
commit d21d5045710b9a74e8dfd2e7970056ec0e8ef893
Merge: 7c54a1b d495bbc
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Nov 8 10:50:02 2018 +0100
Merge remote-tracking branch 'origin/master' into camel-3.x
apache-camel/src/main/descriptors/common-bin.xml | 2 +
bom/camel-bom/pom.xml | 10 +
camel-core/src/main/docs/eips/rollback-eip.adoc | 2 +-
.../src/main/docs/eips/transactional-client.adoc | 154 +++++++++-
.../AdviceWithWeaveByTypeOnExceptionTest.java | 63 ++++
.../camel-amqp/src/main/docs/amqp-component.adoc | 2 +-
.../src/main/docs/consul-component.adoc | 6 +-
.../src/main/resources/META-INF/spring.schemas | 1 +
.../src/main/docs/disruptor-component.adoc | 4 +-
.../src/main/docs/ehcache-component.adoc | 2 +-
.../main/docs/elasticsearch-rest-component.adoc | 37 ++-
.../elasticsearch/ElasticsearchOperation.java | 1 +
.../elasticsearch/ElasticsearchProducer.java | 6 +
.../ElasticsearchActionRequestConverter.java | 6 +-
...asticsearchGetSearchDeleteExistsUpdateTest.java | 27 ++
.../remote/sftp/SftpConsumerDisconnectTest.java | 7 +-
.../org/apache/camel/http/common/CamelServlet.java | 1 -
.../camel-http4/src/main/docs/http4-component.adoc | 3 +-
.../apache/camel/component/http4/HttpEndpoint.java | 18 ++
.../src/main/docs/infinispan-component.adoc | 2 +-
.../component/jetty9/AttachmentHttpBinding.java | 7 +
.../camel-jms/src/main/docs/jms-component.adoc | 1 +
.../camel-jpa/src/main/docs/jpa-component.adoc | 2 +-
.../apache/camel/component/jpa/JpaEndpoint.java | 2 +-
.../apache/camel/component/jpa/JpaProducer.java | 4 +-
.../camel/component/jpa/AbstractJpaMethodTest.java | 2 +-
.../jpa/JpaWithNativeQueryWithResultClassTest.java | 2 +-
.../jpa/JpaProducerPassingEntityManagerTest.java | 2 +-
.../JpaProducerWithQueryParametersHeaderTest.java | 7 +-
.../apache/camel/processor/jpa/JpaRouteTest.java | 2 +-
.../jsonvalidator/JsonValidatorEndpoint.java | 42 ++-
.../jsonvalidator/ValidatorInputStreamTest.java | 53 ++++
.../linkedin/api/LinkedInOAuthRequestFilter.java | 41 ++-
.../api/AbstractResourceIntegrationTest.java | 23 +-
.../api/PeopleResourceIntegrationTest.java | 7 +-
.../src/test/resources/test-options.properties | 4 +
.../src/main/docs/linkedin-component.adoc | 8 +-
...Storage.java => DefaultOAuthSecureStorage.java} | 36 +--
.../component/linkedin/LinkedInComponent.java | 7 +-
.../component/linkedin/LinkedInConfiguration.java | 26 ++
.../internal/CachingOAuthSecureStorage.java | 2 +-
.../src/test/resources/test-options.properties | 4 +
.../camel-mllp/src/main/docs/mllp-component.adoc | 4 +-
.../component/mybatis/MyBatisTestSupport.java | 2 +-
.../src/main/docs/nagios-component.adoc | 2 +-
.../src/main/docs/netty4-component.adoc | 12 +-
components/camel-nsq/pom.xml | 127 ++++++++
.../camel-nsq/src/main/docs/nsq-component.adoc | 110 +++++++
.../apache/camel/component/nsq/NsqComponent.java | 59 ++++
.../camel/component/nsq/NsqConfiguration.java | 242 +++++++++++++++
.../apache/camel/component/nsq/NsqConstants.java | 23 +-
.../apache/camel/component/nsq/NsqConsumer.java | 124 ++++++++
.../apache/camel/component/nsq/NsqEndpoint.java | 92 ++++++
.../apache/camel/component/nsq/NsqProducer.java | 80 +++++
.../camel/component/nsq/NsqSynchronization.java | 35 ++-
.../src/main/resources/META-INF/LICENSE.txt | 203 ++++++++++++
.../src/main/resources/META-INF/NOTICE.txt | 11 +
.../services/org/apache/camel/component/nsq | 18 ++
.../camel/component/nsq/NsqConsumerTest.java | 103 +++++++
.../camel/component/nsq/NsqProducerTest.java | 96 ++++++
.../apache/camel/component/nsq/NsqTestSupport.java | 61 ++++
.../src/test/resources/log4j2.properties} | 23 +-
.../camel/component/rest/swagger/HttpsTest.java | 2 +-
.../rest/swagger/Jetty94ServerFactory.java | 2 +-
components/camel-solr/pom.xml | 2 +-
.../src/main/docs/spring-boot.adoc | 4 +-
.../apache/camel/spring/boot/RoutesCollector.java | 3 +-
.../cloud/CamelCloudConfigurationProperties.java | 2 -
.../boot/CamelAutoConfigurationPropertiesTest.java | 2 +-
...amelAutoConfigurationWithContextRunnerTest.java | 54 ----
.../boot/CamelConfigurationLocationsTest.java | 2 +-
.../camel/spring/boot/CamelEventNotifierTest.java | 2 +-
.../boot/CustomCamelCamelConfigurationTest.java | 2 +-
.../spring/boot/CustomShutdownStrategyTest.java | 2 +-
.../spring/boot/SpringConverterDelegationTest.java | 2 +-
.../camel/spring/boot/issues/RestDslPostTest.java | 2 +-
.../camel/spring/boot/issues/SimpleOgnlTest.java | 2 +-
.../boot/parent/SpringBootRefreshContextTest.java | 5 +-
.../src/main/resources/META-INF/spring.schemas | 1 +
.../src/main/resources/META-INF/spring.schemas | 1 +
.../apache/camel/spring/SpringCamelContext.java | 2 +-
.../src/main/resources/META-INF/spring.schemas | 1 +
.../camel-ssh/src/main/docs/ssh-component.adoc | 4 +-
.../apache/camel/swagger/RestSwaggerSupport.java | 3 +-
.../twitter/DirectMessageProducerTest.java | 2 +-
.../src/main/docs/zookeeper-component.adoc | 2 +-
components/pom.xml | 1 +
components/readme.adoc | 9 +-
docs/user-manual/en/SUMMARY.md | 22 +-
docs/user-manual/en/architecture.adoc | 8 +-
.../user-manual/en/commercial-camel-offerings.adoc | 2 +-
docs/user-manual/en/componentconfiguration.adoc | 44 +++
docs/user-manual/en/endpoint-completer.adoc | 27 ++
docs/user-manual/en/http-session-handling.adoc | 152 +++++++++
docs/user-manual/en/languages.adoc | 3 +-
docs/user-manual/en/mailing-lists.adoc | 2 +-
docs/user-manual/en/servicepool.adoc | 60 ++++
docs/user-manual/en/threading-model.adoc | 244 +++++++++++++++
docs/user-manual/en/user-stories.adoc | 342 +++++++++++++++++++++
.../en/using-osgi-blueprint-with-camel.adoc | 11 +-
parent/pom.xml | 120 ++++----
.../features/src/main/resources/bundles.properties | 1 -
.../karaf/features/src/main/resources/features.xml | 18 +-
.../springboot/LinkedInComponentConfiguration.java | 25 ++
.../components-starter/camel-nsq-starter/pom.xml | 61 ++++
.../springboot/NsqComponentAutoConfiguration.java | 128 ++++++++
.../nsq/springboot/NsqComponentConfiguration.java | 67 ++++
.../src/main/resources/META-INF/LICENSE.txt | 203 ++++++++++++
.../src/main/resources/META-INF/NOTICE.txt | 11 +
.../src/main/resources/META-INF/spring.factories | 14 +-
.../src/main/resources/META-INF/spring.provides | 14 +-
platforms/spring-boot/components-starter/pom.xml | 1 +
.../camel-spring-boot-dependencies/pom.xml | 12 +-
platforms/spring-boot/spring-boot-dm/pom.xml | 8 +-
.../itest/karaf/CamelElasticsearchRestTest.java | 19 ++
...lasticsearchRestTest.java => CamelNsqTest.java} | 7 +-
.../camel/itest/springboot/CamelAmqpTest.java | 1 +
.../{CamelSolrTest.java => CamelNsqTest.java} | 5 +-
.../camel/itest/springboot/CamelSolrTest.java | 2 +
.../maven/bom/generator/BomGeneratorMojo.java | 4 +
.../camel/maven/packaging/PrepareCatalogMojo.java | 4 +
.../maven/packaging/model/ComponentModel.java | 2 +
.../maven/packaging/model/DataFormatModel.java | 5 +
123 files changed, 3487 insertions(+), 343 deletions(-)
diff --cc apache-camel/src/main/descriptors/common-bin.xml
index d47e45d,8c63bdb..2e18886
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@@ -173,8 -196,11 +173,9 @@@
<include>org.apache.camel:camel-mvel</include>
<include>org.apache.camel:camel-mybatis</include>
<include>org.apache.camel:camel-nagios</include>
- <include>org.apache.camel:camel-netty</include>
<include>org.apache.camel:camel-netty4</include>
- <include>org.apache.camel:camel-netty-http</include>
<include>org.apache.camel:camel-netty4-http</include>
+ <include>org.apache.camel:camel-nsq</include>
<include>org.apache.camel:camel-ognl</include>
<include>org.apache.camel:camel-olingo2-api</include>
<include>org.apache.camel:camel-olingo2</include>
@@@ -457,6 -520,9 +458,7 @@@
<include>org.apache.camel:camel-nats-starter</include>
<include>org.apache.camel:camel-netty4-http-starter</include>
<include>org.apache.camel:camel-netty4-starter</include>
- <include>org.apache.camel:camel-netty-http-starter</include>
- <include>org.apache.camel:camel-netty-starter</include>
+ <include>org.apache.camel:camel-nsq-starter</include>
<include>org.apache.camel:camel-ognl-starter</include>
<include>org.apache.camel:camel-olingo2-starter</include>
<include>org.apache.camel:camel-olingo4-starter</include>
diff --cc camel-core/src/test/java/org/apache/camel/processor/interceptor/AdviceWithWeaveByTypeOnExceptionTest.java
index 0000000,2fa4b04..b7a6aa4
mode 000000,100644..100644
--- a/camel-core/src/test/java/org/apache/camel/processor/interceptor/AdviceWithWeaveByTypeOnExceptionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/interceptor/AdviceWithWeaveByTypeOnExceptionTest.java
@@@ -1,0 -1,62 +1,63 @@@
+ /**
+ * 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.interceptor;
+
+ import org.apache.camel.ContextTestSupport;
+ import org.apache.camel.builder.AdviceWithRouteBuilder;
+ import org.apache.camel.builder.RouteBuilder;
+ import org.apache.camel.model.OnExceptionDefinition;
++import org.apache.camel.reifier.RouteReifier;
+ import org.junit.Test;
+
+ /**
+ * Advice with tests
+ */
+ public class AdviceWithWeaveByTypeOnExceptionTest extends ContextTestSupport {
+
+ @Test
+ public void testWeaveOnException() throws Exception {
- context.getRouteDefinitions().get(0).adviceWith(context, new AdviceWithRouteBuilder() {
++ RouteReifier.adviceWith(context.getRouteDefinitions().get(0), context, new AdviceWithRouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ weaveByType(OnExceptionDefinition.class).after().to("mock:error");
+ }
+ });
+
+ getMockEndpoint("mock:error").expectedMessageCount(1);
+ getMockEndpoint("mock:result").expectedMessageCount(0);
+
+ template.sendBody("direct:start", "Hello World");
+
+ assertMockEndpointsSatisfied();
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("direct:start")
+ .onException(Exception.class)
+ .handled(true)
+ .to("log:error")
+ .end()
+ .throwException(new IllegalArgumentException("Forced"))
+ .to("mock:result");
+ }
+ };
+ }
+ }
diff --cc components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
index 3dc5789,9841e6c..682cf82
--- a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
+++ b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
@@@ -31,7 -32,8 +32,6 @@@ import org.apache.camel.api.management.
import org.apache.camel.component.ResourceEndpoint;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriParam;
- import org.apache.camel.util.IOHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
* Validates the payload of a message using NetworkNT JSON Schema library.
diff --cc components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInComponent.java
index ad11fce,3d8f05d..297164b
--- a/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInComponent.java
+++ b/components/camel-linkedin/camel-linkedin-component/src/main/java/org/apache/camel/component/linkedin/LinkedInComponent.java
@@@ -22,9 -22,9 +22,10 @@@ import javax.net.ssl.SSLContext
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
+import org.apache.camel.RuntimeCamelException;
import org.apache.camel.component.linkedin.api.LinkedInOAuthRequestFilter;
import org.apache.camel.component.linkedin.api.OAuthParams;
+ import org.apache.camel.component.linkedin.api.OAuthSecureStorage;
import org.apache.camel.component.linkedin.internal.CachingOAuthSecureStorage;
import org.apache.camel.component.linkedin.internal.LinkedInApiCollection;
import org.apache.camel.component.linkedin.internal.LinkedInApiName;
diff --cc components/camel-netty4/src/main/docs/netty4-component.adoc
index 1b50653,0d62964..1381961
--- a/components/camel-netty4/src/main/docs/netty4-component.adoc
+++ b/components/camel-netty4/src/main/docs/netty4-component.adoc
@@@ -255,8 -249,14 +249,14 @@@ The component supports 78 options, whic
| *camel.component.netty4.executor-service* | To use the given EventExecutorGroup. The option is a io.netty.util.concurrent.EventExecutorGroup type. | | String
| *camel.component.netty4.maximum-pool-size* | The thread pool size for the EventExecutorGroup if its in use. The default value is 16. | 16 | Integer
| *camel.component.netty4.resolve-property-placeholders* | Whether the component should resolve property placeholders on itself when starting. Only properties which are of String type can use property placeholders. | true | Boolean
-| *camel.component.netty4.ssl-context-parameters* | To configure security using SSLContextParameters. The option is a org.apache.camel.util.jsse.SSLContextParameters type. | | String
+| *camel.component.netty4.ssl-context-parameters* | To configure security using SSLContextParameters. The option is a org.apache.camel.support.jsse.SSLContextParameters type. | | String
| *camel.component.netty4.use-global-ssl-context-parameters* | Enable usage of global SSL context parameters. | false | Boolean
+ | *camel.component.netty4.configuration.client-pipeline-factory* | @deprecated use #setClientInitializerFactory | | ClientInitializer Factory
+ | *camel.component.netty4.configuration.decoder* | A custom ChannelHandler class that can be used to perform special marshalling of inbound payloads. | | ChannelHandler
+ | *camel.component.netty4.configuration.encoder* | A custom ChannelHandler class that can be used to perform special marshalling of outbound payloads. | | ChannelHandler
+ | *camel.component.netty4.configuration.key-store-file* | Client side certificate keystore to be used for encryption | | File
+ | *camel.component.netty4.configuration.server-pipeline-factory* | @deprecated use #setServerInitializerFactory | | ServerInitializer Factory
+ | *camel.component.netty4.configuration.trust-store-file* | Server side certificate keystore to be used for encryption | | File
|===
// spring-boot-auto-configure options: END
diff --cc components/pom.xml
index ed5bc0a,4356c93..a2917dc
--- a/components/pom.xml
+++ b/components/pom.xml
@@@ -200,8 -225,11 +200,9 @@@
<module>camel-mybatis</module>
<module>camel-nagios</module>
<module>camel-nats</module>
- <module>camel-netty</module>
<module>camel-netty4</module>
- <module>camel-netty-http</module>
<module>camel-netty4-http</module>
+ <module>camel-nsq</module>
<module>camel-ognl</module>
<module>camel-olingo2</module>
<module>camel-olingo4</module>
diff --cc docs/user-manual/en/SUMMARY.md
index e527294,9abdaca..462a656
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@@ -339,8 -353,11 +338,9 @@@
* [MyBatis Bean](mybatis-bean-component.adoc)
* [Nagios](nagios-component.adoc)
* [Nats](nats-component.adoc)
- * [Netty](netty-component.adoc)
- * [Netty HTTP](netty-http-component.adoc)
* [Netty4](netty4-component.adoc)
* [Netty4 HTTP](netty4-http-component.adoc)
+ * [nsq](nsq-component.adoc)
* [Olingo2](olingo2-component.adoc)
* [Olingo4](olingo4-component.adoc)
* [OPC UA Client](milo-client-component.adoc)
@@@ -473,10 -508,14 +473,12 @@@
* [Bindy Fixed Length](bindy-dataformat.adoc)
* [Bindy Key Value Pair](bindy-dataformat.adoc)
* [Boon](boon-dataformat.adoc)
- * [Castor](castor-dataformat.adoc)
* [Crypto (Java Cryptographic Extension)](crypto-dataformat.adoc)
* [CSV](csv-dataformat.adoc)
+ * [FHIR JSon](fhirJson-dataformat.adoc)
+ * [FHIR XML](fhirXml-dataformat.adoc)
* [Flatpack](flatpack-dataformat.adoc)
* [GZip](gzip-dataformat.adoc)
- * [Hessian](hessian-dataformat.adoc)
* [HL7](hl7-dataformat.adoc)
* [iCal](ical-dataformat.adoc)
* [JacksonXML](jacksonxml-dataformat.adoc)
diff --cc platforms/spring-boot/components-starter/pom.xml
index 231b1ba,8208920..4329011
--- a/platforms/spring-boot/components-starter/pom.xml
+++ b/platforms/spring-boot/components-starter/pom.xml
@@@ -245,8 -265,11 +245,9 @@@
<module>camel-mybatis-starter</module>
<module>camel-nagios-starter</module>
<module>camel-nats-starter</module>
- <module>camel-netty-http-starter</module>
- <module>camel-netty-starter</module>
<module>camel-netty4-http-starter</module>
<module>camel-netty4-starter</module>
+ <module>camel-nsq-starter</module>
<module>camel-ognl-starter</module>
<module>camel-olingo2-starter</module>
<module>camel-olingo4-starter</module>