davsclaus commented on code in PR #26684:
URL: https://github.com/apache/camel/pull/26684#discussion_r4068835771


##########
components/camel-ai/camel-jev/src/main/java/org/apache/camel/component/jev/JevPredicate.java:
##########
@@ -0,0 +1,114 @@
+/*
+ * 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.jev;
+
+import java.util.Map;
+import java.util.Objects;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Exchange;
+import org.apache.camel.Expression;
+import org.apache.camel.Predicate;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.util.json.JsonObject;
+
+/**
+ * A synchronous Noul predicate. Each invocation submits freshly selected 
state, preserves the message body and stores
+ * the complete response in {@link #RESULT}. The supplied state expression 
must be thread-safe.
+ */
+public final class JevPredicate implements Predicate {

Review Comment:
   Please remove this class and replace it with a `@Language("jev")` 
`JevLanguage` in the component (see the review body). The generic `<language 
language="jev">` / `language:` element in XML/YAML and `.language("jev", ...)` 
in Java then reach it without any core-model change, and without the `ref` + 
`beans:` constructor setup. The threshold / band / uncertainty-policy 
evaluation in `matches()` moves into the predicate the language creates.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to