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 2015/07/18 09:36:10 UTC

[1/3] camel git commit: CAMEL-8639: Ensure FTP uses the FTP poll strategy by default. Thanks to Rob Sessink for the patch.

Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x 13831f672 -> 560044167
  refs/heads/camel-2.15.x 42d16b70a -> e8b81a9bf
  refs/heads/master 6d8b3a916 -> d234a5311


CAMEL-8639: Ensure FTP uses the FTP poll strategy by default. Thanks to Rob Sessink for the patch.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d234a531
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d234a531
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d234a531

Branch: refs/heads/master
Commit: d234a5311dfa1e792cf87e6131cd8398e976b7f0
Parents: 6d8b3a9
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Jul 18 09:41:02 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jul 18 09:41:02 2015 +0200

----------------------------------------------------------------------
 .../file/remote/RemoteFileEndpoint.java         |  6 ++++
 ...moteFilePollingConsumerPollStrategyTest.java | 30 ++++++++++++++++++++
 2 files changed, 36 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d234a531/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
index 08a3808..e91d85fa 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
@@ -50,6 +50,9 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         // for ftp we need to use higher interval/checkout that for files
         setReadLockTimeout(20000);
         setReadLockCheckInterval(5000);
+        // explicitly set RemoteFilePollingConsumerPollStrategy otherwise
+        // DefaultPollingConsumerPollStrategy is be used
+        setPollStrategy(new RemoteFilePollingConsumerPollStrategy());
     }
 
     public RemoteFileEndpoint(String uri, RemoteFileComponent<T> component, RemoteFileConfiguration configuration) {
@@ -58,6 +61,9 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         // for ftp we need to use higher interval/checkout that for files
         setReadLockTimeout(20000);
         setReadLockCheckInterval(5000);
+        // explicitly set RemoteFilePollingConsumerPollStrategy otherwise
+        // DefaultPollingConsumerPollStrategy is be used
+        setPollStrategy(new RemoteFilePollingConsumerPollStrategy());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/d234a531/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java
new file mode 100644
index 0000000..1d05b97
--- /dev/null
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java
@@ -0,0 +1,30 @@
+/**
+ * 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.file.remote;
+
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class RemoteEndPointRemoteFilePollingConsumerPollStrategyTest extends CamelTestSupport {
+
+    @Test
+    public void testPollStrategy() throws Exception {
+        RemoteFileEndpoint<?> endpoint = context.getEndpoint("ftp://hostname", RemoteFileEndpoint.class);
+        assertTrue(endpoint.getPollStrategy() instanceof RemoteFilePollingConsumerPollStrategy);
+    }
+
+}


[3/3] camel git commit: CAMEL-8639: Ensure FTP uses the FTP poll strategy by default. Thanks to Rob Sessink for the patch.

Posted by da...@apache.org.
CAMEL-8639: Ensure FTP uses the FTP poll strategy by default. Thanks to Rob Sessink for the patch.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/56004416
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/56004416
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/56004416

Branch: refs/heads/camel-2.14.x
Commit: 560044167b6605abcd439716a58da5dd23759f4e
Parents: 13831f6
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Jul 18 09:41:02 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jul 18 09:42:55 2015 +0200

----------------------------------------------------------------------
 .../file/remote/RemoteFileEndpoint.java         |  6 ++++
 ...moteFilePollingConsumerPollStrategyTest.java | 30 ++++++++++++++++++++
 2 files changed, 36 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/56004416/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
index 97a310d..e327292 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
@@ -50,6 +50,9 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         // for ftp we need to use higher interval/checkout that for files
         setReadLockTimeout(20000);
         setReadLockCheckInterval(5000);
+        // explicitly set RemoteFilePollingConsumerPollStrategy otherwise
+        // DefaultPollingConsumerPollStrategy is be used
+        setPollStrategy(new RemoteFilePollingConsumerPollStrategy());
     }
 
     public RemoteFileEndpoint(String uri, RemoteFileComponent<T> component, RemoteFileConfiguration configuration) {
@@ -58,6 +61,9 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         // for ftp we need to use higher interval/checkout that for files
         setReadLockTimeout(20000);
         setReadLockCheckInterval(5000);
+        // explicitly set RemoteFilePollingConsumerPollStrategy otherwise
+        // DefaultPollingConsumerPollStrategy is be used
+        setPollStrategy(new RemoteFilePollingConsumerPollStrategy());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/56004416/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java
new file mode 100644
index 0000000..1d05b97
--- /dev/null
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java
@@ -0,0 +1,30 @@
+/**
+ * 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.file.remote;
+
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class RemoteEndPointRemoteFilePollingConsumerPollStrategyTest extends CamelTestSupport {
+
+    @Test
+    public void testPollStrategy() throws Exception {
+        RemoteFileEndpoint<?> endpoint = context.getEndpoint("ftp://hostname", RemoteFileEndpoint.class);
+        assertTrue(endpoint.getPollStrategy() instanceof RemoteFilePollingConsumerPollStrategy);
+    }
+
+}


[2/3] camel git commit: CAMEL-8639: Ensure FTP uses the FTP poll strategy by default. Thanks to Rob Sessink for the patch.

Posted by da...@apache.org.
CAMEL-8639: Ensure FTP uses the FTP poll strategy by default. Thanks to Rob Sessink for the patch.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e8b81a9b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e8b81a9b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e8b81a9b

Branch: refs/heads/camel-2.15.x
Commit: e8b81a9bfc8255fe949f5aebe69d727b1a49daa2
Parents: 42d16b7
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Jul 18 09:41:02 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jul 18 09:41:38 2015 +0200

----------------------------------------------------------------------
 .../file/remote/RemoteFileEndpoint.java         |  6 ++++
 ...moteFilePollingConsumerPollStrategyTest.java | 30 ++++++++++++++++++++
 2 files changed, 36 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e8b81a9b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
index 97a310d..e327292 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileEndpoint.java
@@ -50,6 +50,9 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         // for ftp we need to use higher interval/checkout that for files
         setReadLockTimeout(20000);
         setReadLockCheckInterval(5000);
+        // explicitly set RemoteFilePollingConsumerPollStrategy otherwise
+        // DefaultPollingConsumerPollStrategy is be used
+        setPollStrategy(new RemoteFilePollingConsumerPollStrategy());
     }
 
     public RemoteFileEndpoint(String uri, RemoteFileComponent<T> component, RemoteFileConfiguration configuration) {
@@ -58,6 +61,9 @@ public abstract class RemoteFileEndpoint<T> extends GenericFileEndpoint<T> {
         // for ftp we need to use higher interval/checkout that for files
         setReadLockTimeout(20000);
         setReadLockCheckInterval(5000);
+        // explicitly set RemoteFilePollingConsumerPollStrategy otherwise
+        // DefaultPollingConsumerPollStrategy is be used
+        setPollStrategy(new RemoteFilePollingConsumerPollStrategy());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/e8b81a9b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java
new file mode 100644
index 0000000..1d05b97
--- /dev/null
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/RemoteEndPointRemoteFilePollingConsumerPollStrategyTest.java
@@ -0,0 +1,30 @@
+/**
+ * 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.file.remote;
+
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class RemoteEndPointRemoteFilePollingConsumerPollStrategyTest extends CamelTestSupport {
+
+    @Test
+    public void testPollStrategy() throws Exception {
+        RemoteFileEndpoint<?> endpoint = context.getEndpoint("ftp://hostname", RemoteFileEndpoint.class);
+        assertTrue(endpoint.getPollStrategy() instanceof RemoteFilePollingConsumerPollStrategy);
+    }
+
+}