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 2024/09/09 10:25:12 UTC
(camel) 03/14: CAMEL-21183: BrowseEndpoint should have limit/filter to optimize returned data from component implementations
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch brow
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 1377b1d27d9c13bebfc41d6052f1e5620d605609
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Sep 7 18:07:52 2024 +0200
CAMEL-21183: BrowseEndpoint should have limit/filter to optimize returned data from component implementations
---
.../src/main/java/org/apache/camel/spi/BrowsableEndpoint.java | 9 ++++-----
.../java/org/apache/camel/component/browse/BrowseFilterTest.java | 4 ++--
.../java/org/apache/camel/component/browse/BrowseLimitTest.java | 4 ++--
3 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/BrowsableEndpoint.java b/core/camel-api/src/main/java/org/apache/camel/spi/BrowsableEndpoint.java
index b4296a40fde..9eb3963ebae 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/BrowsableEndpoint.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/BrowsableEndpoint.java
@@ -37,12 +37,11 @@ public interface BrowsableEndpoint extends Endpoint {
List<Exchange> getExchanges();
/**
- * Return the exchanges available on this endpoint, allowing to filter the
- * result in the specific component.
+ * Return the exchanges available on this endpoint, allowing to filter the result in the specific component.
*
- * @param limit to limit the result o a specific maximum. Use 0 for no limit.
- * @param filter filter to filter among the messages to include.
- * @return the exchanges on this endpoint
+ * @param limit to limit the result o a specific maximum. Use 0 for no limit.
+ * @param filter filter to filter among the messages to include.
+ * @return the exchanges on this endpoint
*/
default List<Exchange> getExchanges(int limit, Predicate filter) {
List<Exchange> answer = getExchanges();
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/browse/BrowseFilterTest.java b/core/camel-core/src/test/java/org/apache/camel/component/browse/BrowseFilterTest.java
index b15c2312c98..c7f4378eecd 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/browse/BrowseFilterTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/browse/BrowseFilterTest.java
@@ -16,6 +16,8 @@
*/
package org.apache.camel.component.browse;
+import java.util.Collection;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
@@ -23,8 +25,6 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.spi.BrowsableEndpoint;
import org.junit.jupiter.api.Test;
-import java.util.Collection;
-
import static org.junit.jupiter.api.Assertions.assertEquals;
public class BrowseFilterTest extends ContextTestSupport {
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/browse/BrowseLimitTest.java b/core/camel-core/src/test/java/org/apache/camel/component/browse/BrowseLimitTest.java
index 42299c47796..1d48dd52c72 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/browse/BrowseLimitTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/browse/BrowseLimitTest.java
@@ -16,14 +16,14 @@
*/
package org.apache.camel.component.browse;
+import java.util.Collection;
+
import org.apache.camel.ContextTestSupport;
import org.apache.camel.Endpoint;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.spi.BrowsableEndpoint;
import org.junit.jupiter.api.Test;
-import java.util.Collection;
-
import static org.junit.jupiter.api.Assertions.assertEquals;
public class BrowseLimitTest extends ContextTestSupport {