You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/07/04 10:47:48 UTC
[1/3] camel git commit: Polished
Repository: camel
Updated Branches:
refs/heads/camel-2.19.x bb07bcd25 -> 1a23895dd
refs/heads/master 0bab270c8 -> b28c4da09
Polished
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4bef6b29
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4bef6b29
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4bef6b29
Branch: refs/heads/master
Commit: 4bef6b29db9696707583d92be8bb25e17af33ebd
Parents: 0bab270
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jul 4 11:38:35 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jul 4 11:38:35 2017 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/camel/impl/DefaultCamelContext.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/4bef6b29/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index 26a865d..ef50425 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -3262,7 +3262,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
validatorRegistry = new DefaultValidatorRegistry(this, validators);
addService(validatorRegistry, true, true);
- // optimised to not include runtimeEndpointRegistry unless its enabled or JMX statis is in extended mode
+ // optimised to not include runtimeEndpointRegistry unless its enabled or JMX statistics is in extended mode
if (runtimeEndpointRegistry == null && getManagementStrategy() != null && getManagementStrategy().getManagementAgent() != null) {
Boolean isEnabled = getManagementStrategy().getManagementAgent().getEndpointRuntimeStatisticsEnabled();
boolean isExtended = getManagementStrategy().getManagementAgent().getStatisticsLevel().isExtended();
@@ -3341,7 +3341,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
// start routes
if (doNotStartRoutesOnFirstStart) {
- log.debug("Skip starting of routes as CamelContext has been configured with autoStartup=false");
+ log.debug("Skip starting routes as CamelContext has been configured with autoStartup=false");
}
// invoke this logic to warmup the routes and if possible also start the routes
[3/3] camel git commit: CAMEL-11506: camel-catalog-maven should use
Apache Commons http-client 3.1 to download http/https as it has support for
timeout which the basic handler from the JDK does not.
Posted by da...@apache.org.
CAMEL-11506: camel-catalog-maven should use Apache Commons http-client 3.1 to download http/https as it has support for timeout which the basic handler from the JDK does not.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1a23895d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1a23895d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1a23895d
Branch: refs/heads/camel-2.19.x
Commit: 1a23895dd5e51014bdf8720b3a3d18ea5ebb72a4
Parents: bb07bcd
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jul 4 12:46:51 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jul 4 12:47:39 2017 +0200
----------------------------------------------------------------------
.../catalog/maven/MavenVersionManager.java | 2 +-
.../catalog/maven/PatchedHttpClientHandler.java | 72 --------------------
.../catalog/maven/TimeoutHttpClientHandler.java | 72 ++++++++++++++++++++
3 files changed, 73 insertions(+), 73 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/1a23895d/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/MavenVersionManager.java
----------------------------------------------------------------------
diff --git a/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/MavenVersionManager.java b/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/MavenVersionManager.java
index d9cfa1a..39fe059 100644
--- a/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/MavenVersionManager.java
+++ b/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/MavenVersionManager.java
@@ -37,7 +37,7 @@ import org.apache.ivy.util.url.URLHandlerRegistry;
public class MavenVersionManager implements VersionManager {
private final ClassLoader classLoader = new GroovyClassLoader();
- private final PatchedHttpClientHandler httpClient = new PatchedHttpClientHandler();
+ private final TimeoutHttpClientHandler httpClient = new TimeoutHttpClientHandler();
private String version;
private String runtimeProviderVersion;
private String cacheDirectory;
http://git-wip-us.apache.org/repos/asf/camel/blob/1a23895d/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/PatchedHttpClientHandler.java
----------------------------------------------------------------------
diff --git a/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/PatchedHttpClientHandler.java b/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/PatchedHttpClientHandler.java
deleted file mode 100644
index 499ed58..0000000
--- a/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/PatchedHttpClientHandler.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.catalog.maven;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import org.apache.ivy.util.url.BasicURLHandler;
-import org.apache.ivy.util.url.HttpClientHandler;
-
-/**
- * A patched {@link HttpClientHandler} which allows to use HttpClient for downloading via http/https
- * and have support for timeouts which is not supported out of the box by default.
- */
-public class PatchedHttpClientHandler extends HttpClientHandler {
-
- // use basic handler for non http/https as it can load from jar/file etc
- private BasicURLHandler basic = new BasicURLHandler();
-
- private int timeout = 10000;
-
- public int getTimeout() {
- return timeout;
- }
-
- /**
- * Sets the timeout in millis (http.socket.timeout) when downloading via http/https protocols.
- * <p/>
- * The default value is 10000
- */
- public void setTimeout(int timeout) {
- this.timeout = timeout;
- }
-
- @Override
- public URLInfo getURLInfo(URL url) {
- // ensure we always use a timeout
- String protocol = url.getProtocol();
- if ("http".equals(protocol) || "https".equals(protocol)) {
- return super.getURLInfo(url, timeout);
- } else {
- // use basic for non http
- return basic.getURLInfo(url, timeout);
- }
- }
-
- @Override
- public InputStream openStream(URL url) throws IOException {
- String protocol = url.getProtocol();
- if ("http".equals(protocol) || "https".equals(protocol)) {
- return super.openStream(url);
- } else {
- // use basic for non http
- return basic.openStream(url);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/1a23895d/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/TimeoutHttpClientHandler.java
----------------------------------------------------------------------
diff --git a/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/TimeoutHttpClientHandler.java b/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/TimeoutHttpClientHandler.java
new file mode 100644
index 0000000..851c0d1
--- /dev/null
+++ b/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/TimeoutHttpClientHandler.java
@@ -0,0 +1,72 @@
+/**
+ * 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.catalog.maven;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.apache.ivy.util.url.BasicURLHandler;
+import org.apache.ivy.util.url.HttpClientHandler;
+
+/**
+ * A {@link HttpClientHandler} which uses HttpClient for downloading via http/https
+ * and have support for connection timeouts which otherwise is not supported by default in Apache Ivy.
+ */
+public class TimeoutHttpClientHandler extends HttpClientHandler {
+
+ // use basic handler for non http/https as it can load from jar/file etc
+ private BasicURLHandler basic = new BasicURLHandler();
+
+ private int timeout = 10000;
+
+ public int getTimeout() {
+ return timeout;
+ }
+
+ /**
+ * Sets the timeout in millis (http.socket.timeout) when downloading via http/https protocols.
+ * <p/>
+ * The default value is 10000
+ */
+ public void setTimeout(int timeout) {
+ this.timeout = timeout;
+ }
+
+ @Override
+ public URLInfo getURLInfo(URL url) {
+ // ensure we always use a timeout
+ String protocol = url.getProtocol();
+ if ("http".equals(protocol) || "https".equals(protocol)) {
+ return super.getURLInfo(url, timeout);
+ } else {
+ // use basic for non http
+ return basic.getURLInfo(url, timeout);
+ }
+ }
+
+ @Override
+ public InputStream openStream(URL url) throws IOException {
+ String protocol = url.getProtocol();
+ if ("http".equals(protocol) || "https".equals(protocol)) {
+ return super.openStream(url);
+ } else {
+ // use basic for non http
+ return basic.openStream(url);
+ }
+ }
+}
[2/3] camel git commit: CAMEL-11506: camel-catalog-maven should use
Apache Commons http-client 3.1 to download http/https as it has support for
timeout which the basic handler from the JDK does not.
Posted by da...@apache.org.
CAMEL-11506: camel-catalog-maven should use Apache Commons http-client 3.1 to download http/https as it has support for timeout which the basic handler from the JDK does not.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b28c4da0
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b28c4da0
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b28c4da0
Branch: refs/heads/master
Commit: b28c4da094c665ce7f19a6cd6a7695b45a4e1dc0
Parents: 4bef6b2
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Jul 4 12:46:51 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Jul 4 12:46:51 2017 +0200
----------------------------------------------------------------------
.../catalog/maven/MavenVersionManager.java | 2 +-
.../catalog/maven/PatchedHttpClientHandler.java | 72 --------------------
.../catalog/maven/TimeoutHttpClientHandler.java | 72 ++++++++++++++++++++
3 files changed, 73 insertions(+), 73 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/b28c4da0/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/MavenVersionManager.java
----------------------------------------------------------------------
diff --git a/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/MavenVersionManager.java b/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/MavenVersionManager.java
index d9cfa1a..39fe059 100644
--- a/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/MavenVersionManager.java
+++ b/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/MavenVersionManager.java
@@ -37,7 +37,7 @@ import org.apache.ivy.util.url.URLHandlerRegistry;
public class MavenVersionManager implements VersionManager {
private final ClassLoader classLoader = new GroovyClassLoader();
- private final PatchedHttpClientHandler httpClient = new PatchedHttpClientHandler();
+ private final TimeoutHttpClientHandler httpClient = new TimeoutHttpClientHandler();
private String version;
private String runtimeProviderVersion;
private String cacheDirectory;
http://git-wip-us.apache.org/repos/asf/camel/blob/b28c4da0/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/PatchedHttpClientHandler.java
----------------------------------------------------------------------
diff --git a/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/PatchedHttpClientHandler.java b/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/PatchedHttpClientHandler.java
deleted file mode 100644
index 499ed58..0000000
--- a/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/PatchedHttpClientHandler.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * 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.catalog.maven;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-
-import org.apache.ivy.util.url.BasicURLHandler;
-import org.apache.ivy.util.url.HttpClientHandler;
-
-/**
- * A patched {@link HttpClientHandler} which allows to use HttpClient for downloading via http/https
- * and have support for timeouts which is not supported out of the box by default.
- */
-public class PatchedHttpClientHandler extends HttpClientHandler {
-
- // use basic handler for non http/https as it can load from jar/file etc
- private BasicURLHandler basic = new BasicURLHandler();
-
- private int timeout = 10000;
-
- public int getTimeout() {
- return timeout;
- }
-
- /**
- * Sets the timeout in millis (http.socket.timeout) when downloading via http/https protocols.
- * <p/>
- * The default value is 10000
- */
- public void setTimeout(int timeout) {
- this.timeout = timeout;
- }
-
- @Override
- public URLInfo getURLInfo(URL url) {
- // ensure we always use a timeout
- String protocol = url.getProtocol();
- if ("http".equals(protocol) || "https".equals(protocol)) {
- return super.getURLInfo(url, timeout);
- } else {
- // use basic for non http
- return basic.getURLInfo(url, timeout);
- }
- }
-
- @Override
- public InputStream openStream(URL url) throws IOException {
- String protocol = url.getProtocol();
- if ("http".equals(protocol) || "https".equals(protocol)) {
- return super.openStream(url);
- } else {
- // use basic for non http
- return basic.openStream(url);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/camel/blob/b28c4da0/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/TimeoutHttpClientHandler.java
----------------------------------------------------------------------
diff --git a/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/TimeoutHttpClientHandler.java b/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/TimeoutHttpClientHandler.java
new file mode 100644
index 0000000..851c0d1
--- /dev/null
+++ b/platforms/camel-catalog-maven/src/main/java/org/apache/camel/catalog/maven/TimeoutHttpClientHandler.java
@@ -0,0 +1,72 @@
+/**
+ * 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.catalog.maven;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.apache.ivy.util.url.BasicURLHandler;
+import org.apache.ivy.util.url.HttpClientHandler;
+
+/**
+ * A {@link HttpClientHandler} which uses HttpClient for downloading via http/https
+ * and have support for connection timeouts which otherwise is not supported by default in Apache Ivy.
+ */
+public class TimeoutHttpClientHandler extends HttpClientHandler {
+
+ // use basic handler for non http/https as it can load from jar/file etc
+ private BasicURLHandler basic = new BasicURLHandler();
+
+ private int timeout = 10000;
+
+ public int getTimeout() {
+ return timeout;
+ }
+
+ /**
+ * Sets the timeout in millis (http.socket.timeout) when downloading via http/https protocols.
+ * <p/>
+ * The default value is 10000
+ */
+ public void setTimeout(int timeout) {
+ this.timeout = timeout;
+ }
+
+ @Override
+ public URLInfo getURLInfo(URL url) {
+ // ensure we always use a timeout
+ String protocol = url.getProtocol();
+ if ("http".equals(protocol) || "https".equals(protocol)) {
+ return super.getURLInfo(url, timeout);
+ } else {
+ // use basic for non http
+ return basic.getURLInfo(url, timeout);
+ }
+ }
+
+ @Override
+ public InputStream openStream(URL url) throws IOException {
+ String protocol = url.getProtocol();
+ if ("http".equals(protocol) || "https".equals(protocol)) {
+ return super.openStream(url);
+ } else {
+ // use basic for non http
+ return basic.openStream(url);
+ }
+ }
+}