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 2023/02/27 09:14:10 UTC

[camel] branch main updated (cd3b9c8a08c -> c90c8cc48a3)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from cd3b9c8a08c Sync deps
     new 1a066bd9aee CAMEL-19090: Remove deprecated apis in core
     new b8b5757b545 CAMEL-19090: Remove deprecated apis in core
     new 5d52a6d9076 CAMEL-19090: Remove deprecated apis in core
     new c90c8cc48a3 CAMEL-19090: Remove deprecated apis in core

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/camel/catalog/models.properties     |   2 -
 .../org/apache/camel/catalog/models/inOnly.json    |  20 --
 .../org/apache/camel/catalog/models/inOut.json     |  20 --
 .../apache/camel/catalog/schemas/camel-spring.xsd  | 192 +++---------------
 .../cxf/spring/FileToCxfMessageDataFormatTest.xml  |   2 +-
 .../cxf/spring/FileToCxfMessageDataFormatTest.xml  |   2 +-
 .../SpringCamelContextShutdownAfterBeanTest.xml    |   6 +-
 .../SpringCamelContextShutdownBeforeBeanTest.xml   |   6 +-
 .../transformer/SpringTransformerRouteTest.xml     |   8 +-
 .../issues/SpringRenameFileOnCommitIssueTest.xml   |   2 +-
 .../SpringOnExceptionUseOriginalMessageTest.xml    |   2 +-
 .../camel/spring/processor/setExchangePattern.xml  |   4 +-
 .../processor/setExchangePatternWithCustomId.xml   |   4 +-
 .../docs/modules/eips/examples/json/inOnly.json    |   1 -
 .../docs/modules/eips/examples/json/inOut.json     |   1 -
 .../main/docs/modules/eips/pages/inOnly-eip.adoc   |   3 +-
 .../main/docs/modules/eips/pages/inOut-eip.adoc    |   3 +-
 .../services/org/apache/camel/model.properties     |   2 -
 .../resources/org/apache/camel/model/inOnly.json   |  20 --
 .../resources/org/apache/camel/model/inOut.json    |  20 --
 .../resources/org/apache/camel/model/jaxb.index    |   2 -
 .../org/apache/camel/builder/BuilderSupport.java   |  16 +-
 .../org/apache/camel/model/InOnlyDefinition.java   |  66 -------
 .../org/apache/camel/model/InOutDefinition.java    |  66 -------
 .../apache/camel/model/ProcessorDefinition.java    | 217 +--------------------
 .../org/apache/camel/reifier/ProcessorReifier.java |   6 -
 .../scheduler/SchedulerBlockingManualTest.java     |   5 +-
 .../org/apache/camel/language/TokenizerTest.java   |   4 +-
 .../java/org/apache/camel/xml/in/ModelParser.java  |  28 +--
 .../java/org/apache/camel/xml/out/ModelWriter.java |  28 ---
 .../ROOT/pages/camel-4-migration-guide.adoc        |   5 +
 .../dsl/yaml/deserializers/ModelDeserializers.java | 152 ---------------
 .../deserializers/ModelDeserializersResolver.java  |   6 -
 .../generated/resources/schema/camel-yaml-dsl.json |  68 -------
 .../generated/resources/schema/camelYamlDsl.json   |  62 ------
 35 files changed, 71 insertions(+), 980 deletions(-)
 delete mode 100644 catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/inOnly.json
 delete mode 100644 catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/inOut.json
 delete mode 120000 core/camel-core-engine/src/main/docs/modules/eips/examples/json/inOnly.json
 delete mode 120000 core/camel-core-engine/src/main/docs/modules/eips/examples/json/inOut.json
 delete mode 100644 core/camel-core-model/src/generated/resources/org/apache/camel/model/inOnly.json
 delete mode 100644 core/camel-core-model/src/generated/resources/org/apache/camel/model/inOut.json
 delete mode 100644 core/camel-core-model/src/main/java/org/apache/camel/model/InOnlyDefinition.java
 delete mode 100644 core/camel-core-model/src/main/java/org/apache/camel/model/InOutDefinition.java


[camel] 02/04: CAMEL-19090: Remove deprecated apis in core

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b8b5757b54516c68dad7e909fcb1bc5657284be5
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Feb 27 09:32:53 2023 +0100

    CAMEL-19090: Remove deprecated apis in core
---
 .../org/apache/camel/catalog/models.properties     |   2 -
 .../org/apache/camel/catalog/models/inOnly.json    |  20 ---
 .../org/apache/camel/catalog/models/inOut.json     |  20 ---
 .../apache/camel/catalog/schemas/camel-spring.xsd  | 192 +++------------------
 .../cxf/spring/FileToCxfMessageDataFormatTest.xml  |   2 +-
 .../cxf/spring/FileToCxfMessageDataFormatTest.xml  |   2 +-
 .../transformer/SpringTransformerRouteTest.xml     |   8 +-
 .../issues/SpringRenameFileOnCommitIssueTest.xml   |   2 +-
 .../SpringOnExceptionUseOriginalMessageTest.xml    |   2 +-
 .../camel/spring/processor/setExchangePattern.xml  |   4 +-
 .../processor/setExchangePatternWithCustomId.xml   |   4 +-
 .../docs/modules/eips/examples/json/inOnly.json    |   1 -
 .../docs/modules/eips/examples/json/inOut.json     |   1 -
 .../main/docs/modules/eips/pages/inOnly-eip.adoc   |   3 +-
 .../main/docs/modules/eips/pages/inOut-eip.adoc    |   3 +-
 .../services/org/apache/camel/model.properties     |   2 -
 .../resources/org/apache/camel/model/inOnly.json   |  20 ---
 .../resources/org/apache/camel/model/inOut.json    |  20 ---
 .../resources/org/apache/camel/model/jaxb.index    |   2 -
 .../org/apache/camel/model/InOnlyDefinition.java   |  66 -------
 .../org/apache/camel/model/InOutDefinition.java    |  66 -------
 .../org/apache/camel/reifier/ProcessorReifier.java |   6 -
 .../java/org/apache/camel/xml/in/ModelParser.java  |  28 +--
 .../java/org/apache/camel/xml/out/ModelWriter.java |  28 ---
 .../ROOT/pages/camel-4-migration-guide.adoc        |   5 +
 .../dsl/yaml/deserializers/ModelDeserializers.java | 152 ----------------
 .../deserializers/ModelDeserializersResolver.java  |   6 -
 .../generated/resources/schema/camel-yaml-dsl.json |  68 --------
 .../generated/resources/schema/camelYamlDsl.json   |  62 -------
 29 files changed, 52 insertions(+), 745 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
index c64c75221b6..da7f83bbcca 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models.properties
@@ -64,8 +64,6 @@ hl7
 hl7terser
 ical
 idempotentConsumer
-inOnly
-inOut
 inputType
 intercept
 interceptFrom
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/inOnly.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/inOnly.json
deleted file mode 100644
index c2efa34e73c..00000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/inOnly.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "model": {
-    "kind": "model",
-    "name": "inOnly",
-    "title": "In Only",
-    "description": "Marks the exchange pattern for the route to one way",
-    "deprecated": true,
-    "label": "eip,routing",
-    "javaType": "org.apache.camel.model.InOnlyDefinition",
-    "abstract": false,
-    "input": true,
-    "output": false
-  },
-  "properties": {
-    "uri": { "kind": "attribute", "displayName": "Uri", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the uri of the endpoint to send to." },
-    "disabled": { "kind": "attribute", "displayName": "Disabled", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
-    "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
-    "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" }
-  }
-}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/inOut.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/inOut.json
deleted file mode 100644
index dd818bae199..00000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/inOut.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "model": {
-    "kind": "model",
-    "name": "inOut",
-    "title": "In Out",
-    "description": "Marks the exchange pattern for the route to request\/reply",
-    "deprecated": true,
-    "label": "eip,routing",
-    "javaType": "org.apache.camel.model.InOutDefinition",
-    "abstract": false,
-    "input": true,
-    "output": false
-  },
-  "properties": {
-    "uri": { "kind": "attribute", "displayName": "Uri", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the uri of the endpoint to send to." },
-    "disabled": { "kind": "attribute", "displayName": "Disabled", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
-    "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
-    "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" }
-  }
-}
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index ed24c060c14..0a6c78e736a 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -579,22 +579,6 @@ Filters out duplicate messages
     </xs:annotation>
   </xs:element>
     
-  <xs:element name="inOnly" type="tns:inOnlyDefinition">
-    <xs:annotation>
-      <xs:documentation xml:lang="en"><![CDATA[
-Deprecated: Marks the exchange pattern for the route to one way
-      ]]></xs:documentation>
-    </xs:annotation>
-  </xs:element>
-    
-  <xs:element name="inOut" type="tns:inOutDefinition">
-    <xs:annotation>
-      <xs:documentation xml:lang="en"><![CDATA[
-Deprecated: Marks the exchange pattern for the route to request/reply
-      ]]></xs:documentation>
-    </xs:annotation>
-  </xs:element>
-    
   <xs:element name="inputType" type="tns:inputTypeDefinition">
     <xs:annotation>
       <xs:documentation xml:lang="en"><![CDATA[
@@ -3398,10 +3382,6 @@ will fallback to use the fixed value if the Expression result was null or 0.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -4071,10 +4051,6 @@ should be intercepted by this exception type or not.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -4277,10 +4253,6 @@ should be intercepted by this exception type or not.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -4461,10 +4433,6 @@ the branch that matched. Default value: false
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -4619,10 +4587,6 @@ the branch that matched. Default value: false
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -6243,10 +6207,6 @@ default WARN. Default value: WARN
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -6406,10 +6366,6 @@ Setting this allows to know if the filter predicate evaluated as true or false.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -6666,10 +6622,6 @@ Global option value.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -6834,56 +6786,6 @@ remove the key on failure. Default value: true
       
   </xs:complexType>
     
-  <xs:complexType name="inOnlyDefinition">
-        
-    <xs:complexContent>
-            
-      <xs:extension base="tns:sendDefinition">
-                
-        <xs:sequence/>
-              
-      </xs:extension>
-          
-    </xs:complexContent>
-      
-  </xs:complexType>
-    
-  <xs:complexType abstract="true" name="sendDefinition">
-        
-    <xs:complexContent>
-            
-      <xs:extension base="tns:noOutputDefinition">
-                
-        <xs:sequence/>
-                
-        <xs:attribute name="uri" type="xs:string">
-          <xs:annotation>
-            <xs:documentation xml:lang="en"><![CDATA[
-Sets the uri of the endpoint to send to.
-            ]]></xs:documentation>
-          </xs:annotation>
-        </xs:attribute>
-              
-      </xs:extension>
-          
-    </xs:complexContent>
-      
-  </xs:complexType>
-    
-  <xs:complexType name="inOutDefinition">
-        
-    <xs:complexContent>
-            
-      <xs:extension base="tns:sendDefinition">
-                
-        <xs:sequence/>
-              
-      </xs:extension>
-          
-    </xs:complexContent>
-      
-  </xs:complexType>
-    
   <xs:complexType name="inputTypeDefinition">
         
     <xs:complexContent>
@@ -6954,10 +6856,6 @@ Whether if validation is required for this input type. Default value: false
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -7131,10 +7029,6 @@ configured, then all incoming messages is intercepted.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -7311,10 +7205,6 @@ process its result.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -7492,10 +7382,6 @@ specified using uri syntax, eg mynamecount=4&type=gold.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -7962,10 +7848,6 @@ To refer to a custom logger instance to lookup from the registry.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -11544,10 +11426,6 @@ decompressed size. Default value: 1073741824
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -11834,10 +11712,6 @@ should be invoked or not.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -12091,10 +11965,6 @@ failure. If this option is enabled then its considered handled as well.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -12345,10 +12215,6 @@ Default value: false
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -12609,10 +12475,6 @@ point.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -12763,10 +12625,6 @@ point.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -13579,10 +13437,6 @@ Name of property to remove.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -14055,10 +13909,6 @@ Reference to the routes in the xml dsl.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -14540,6 +14390,28 @@ producers.
       
   </xs:complexType>
     
+  <xs:complexType abstract="true" name="sendDefinition">
+        
+    <xs:complexContent>
+            
+      <xs:extension base="tns:noOutputDefinition">
+                
+        <xs:sequence/>
+                
+        <xs:attribute name="uri" type="xs:string">
+          <xs:annotation>
+            <xs:documentation xml:lang="en"><![CDATA[
+Sets the uri of the endpoint to send to.
+            ]]></xs:documentation>
+          </xs:annotation>
+        </xs:attribute>
+              
+      </xs:extension>
+          
+    </xs:complexContent>
+      
+  </xs:complexType>
+    
   <xs:complexType name="sagaDefinition">
         
     <xs:complexContent>
@@ -14614,10 +14486,6 @@ compensation/completion exchange.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -15263,10 +15131,6 @@ Sets the comparator to use for sorting.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -15561,10 +15425,6 @@ individual unit of work. Default value: false
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -16270,10 +16130,6 @@ Whether to auto startup components when toD is starting up. Default value: true
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
@@ -16496,10 +16352,6 @@ Sets a reference to use for lookup the policy in the registry.
                         
             <xs:element ref="tns:idempotentConsumer"/>
                         
-            <xs:element ref="tns:inOnly"/>
-                        
-            <xs:element ref="tns:inOut"/>
-                        
             <xs:element ref="tns:intercept"/>
                         
             <xs:element ref="tns:interceptFrom"/>
diff --git a/components/camel-cxf/camel-cxf-spring-rest/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml b/components/camel-cxf/camel-cxf-spring-rest/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml
index ef5bca7c044..8d2d3eb59f8 100644
--- a/components/camel-cxf/camel-cxf-spring-rest/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml
+++ b/components/camel-cxf/camel-cxf-spring-rest/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml
@@ -40,7 +40,7 @@
         <route>
             <from uri="file:target/filetocxf"/>
             <to uri="log:request"/>
-            <inOut uri="routerEndpoint"/>
+            <to uri="routerEndpoint" pattern="InOut"/>
             <to uri="log:reply"/>
             <to uri="mock:result"/>
         </route>
diff --git a/components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml b/components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml
index aec69bf9428..7b1189e44de 100644
--- a/components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml
+++ b/components/camel-cxf/camel-cxf-spring-soap/src/test/resources/org/apache/camel/component/cxf/spring/FileToCxfMessageDataFormatTest.xml
@@ -40,7 +40,7 @@
         <route>
             <from uri="file:target/filetocxf"/>
             <to uri="log:request"/>
-            <inOut uri="routerEndpoint"/>
+            <to uri="routerEndpoint" pattern="InOut"/>
             <to uri="log:reply"/>
             <to uri="mock:result"/>
         </route>
diff --git a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/transformer/SpringTransformerRouteTest.xml b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/transformer/SpringTransformerRouteTest.xml
index ea9a097762a..47ce89a6189 100644
--- a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/transformer/SpringTransformerRouteTest.xml
+++ b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/impl/transformer/SpringTransformerRouteTest.xml
@@ -59,7 +59,7 @@
                 <simple>${body} not is 'org.apache.camel.processor.transformer.TransformerRouteTest\\$AOrder'</simple>
                 <throwException exceptionType="java.lang.Exception" message="expected AOrder object but was '${body}'"/>
             </when>
-            <inOut uri="direct:xyz"/>
+            <to uri="direct:xyz" pattern="InOut"/>
             <to uri="mock:abcresult"/>
         </route>
 
@@ -79,14 +79,14 @@
             <from uri="direct:dataFormat"/>
             <inputType urn="json:JsonXOrder"/>
             <outputType urn="json:JsonXOrderResponse"/>
-            <inOut uri="direct:xyz"/>
+            <to uri="direct:xyz" pattern="InOut"/>
         </route>
         
         <route>
             <from uri="direct:endpoint"/>
             <inputType urn="xml:XmlXOrder"/>
             <outputType urn="xml:XmlXOrderResponse"/>
-            <inOut uri="direct:xyz"/>
+            <to uri="direct:xyz" pattern="InOut"/>
         </route>
         
         <route>
@@ -98,7 +98,7 @@
             <from uri="direct:custom"/>
             <inputType urn="other:OtherXOrder"/>
             <outputType urn="other:OtherXOrderResponse"/>
-            <inOut uri="direct:xyz"/>
+            <to uri="direct:xyz" pattern="InOut"/>
         </route>
 
         <route>
diff --git a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/issues/SpringRenameFileOnCommitIssueTest.xml b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/issues/SpringRenameFileOnCommitIssueTest.xml
index 7f16e60cfb1..b21c213e78f 100644
--- a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/issues/SpringRenameFileOnCommitIssueTest.xml
+++ b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/issues/SpringRenameFileOnCommitIssueTest.xml
@@ -33,7 +33,7 @@
             </setProperty>
             <convertBodyTo type="String"/>
             <to uri="validator:org/apache/camel/spring/issues/validate.xsd"/>
-            <inOut uri="direct:source"/>
+            <to uri="direct:source" pattern="InOut"/>
             <to uri="mock:result"/>
         </route>
 
diff --git a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml
index 184bd507d36..211fc8f0342 100644
--- a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml
+++ b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/onexception/SpringOnExceptionUseOriginalMessageTest.xml
@@ -38,7 +38,7 @@
 
         <route>
             <from uri="direct:a"/>
-            <inOut uri="log:test"/>
+            <to uri="log:test" pattern="InOut"/>
             <process ref="proc" />
         </route>
 
diff --git a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePattern.xml b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePattern.xml
index cde275b4c29..9d1bf90bbb7 100644
--- a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePattern.xml
+++ b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePattern.xml
@@ -29,13 +29,13 @@
     <!-- Send the exchange as InOnly -->
     <route>
       <from uri="direct:testInOut"/>
-      <inOut uri="mock:result"/>
+      <to uri="mock:result" pattern=InOut"/>
     </route>
 
     <!-- Send the exchange as InOnly -->
     <route>
       <from uri="direct:testInOnly"/>
-      <inOnly uri="mock:result"/>
+      <to uri="mock:result" pattern=InOnly"/>
     </route>
 
 
diff --git a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePatternWithCustomId.xml b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePatternWithCustomId.xml
index b2da716b690..00fdec7df1d 100644
--- a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePatternWithCustomId.xml
+++ b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePatternWithCustomId.xml
@@ -28,13 +28,13 @@
     <!-- Send the exchange as InOnly -->
     <route>
       <from uri="direct:testInOut" id="a"/>
-      <inOut uri="mock:result" id="b"/>
+      <to uri="mock:result" pattern="InOut" id="b"/>
     </route>
 
     <!-- Send the exchange as InOnly -->
     <route>
       <from uri="direct:testInOnly" id="c"/>
-      <inOnly uri="mock:result" id="d"/>
+      <to uri="mock:result" pattern="InOnly" id="d"/>
     </route>
 
 
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/examples/json/inOnly.json b/core/camel-core-engine/src/main/docs/modules/eips/examples/json/inOnly.json
deleted file mode 120000
index 2e4deb6f1b9..00000000000
--- a/core/camel-core-engine/src/main/docs/modules/eips/examples/json/inOnly.json
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../camel-core-model/src/generated/resources/org/apache/camel/model/inOnly.json
\ No newline at end of file
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/examples/json/inOut.json b/core/camel-core-engine/src/main/docs/modules/eips/examples/json/inOut.json
deleted file mode 120000
index 4a4140eee1d..00000000000
--- a/core/camel-core-engine/src/main/docs/modules/eips/examples/json/inOut.json
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../../camel-core-model/src/generated/resources/org/apache/camel/model/inOut.json
\ No newline at end of file
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/inOnly-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/inOnly-eip.adoc
index aa2e89ca4e3..9826d1615f2 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/inOnly-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/inOnly-eip.adoc
@@ -8,7 +8,8 @@
 
 The *inOnly:* EIP define an InOnly ExchangePattern.
 
-WARNING: inOnly is deprecated. Use xref:event-message.adoc[setExchangePattern] instead.
+WARNING: inOnly is deprecated in Camel 3.x and removed in Camel 4 onwards.
+Use xref:event-message.adoc[setExchangePattern] instead.
 
 == EIP options
 
diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/inOut-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/inOut-eip.adoc
index 32184d36322..554ec9d563c 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/inOut-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/inOut-eip.adoc
@@ -8,7 +8,8 @@
 
 The *inOut:* EIP define an InOut ExchangePattern.
 
-WARNING: inOut is deprecated. Use xref:event-message.adoc[setExchangePattern] instead.
+WARNING: inOut is deprecated in Camel 3.x and removed in Camel 4 onwards.
+Use xref:event-message.adoc[setExchangePattern] instead.
 
 
 == EIP options
diff --git a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
index c392d7cf2de..eaa4845cf60 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
+++ b/core/camel-core-model/src/generated/resources/META-INF/services/org/apache/camel/model.properties
@@ -65,8 +65,6 @@ hl7
 hl7terser
 ical
 idempotentConsumer
-inOnly
-inOut
 inputType
 intercept
 interceptFrom
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/inOnly.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/inOnly.json
deleted file mode 100644
index c2efa34e73c..00000000000
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/inOnly.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "model": {
-    "kind": "model",
-    "name": "inOnly",
-    "title": "In Only",
-    "description": "Marks the exchange pattern for the route to one way",
-    "deprecated": true,
-    "label": "eip,routing",
-    "javaType": "org.apache.camel.model.InOnlyDefinition",
-    "abstract": false,
-    "input": true,
-    "output": false
-  },
-  "properties": {
-    "uri": { "kind": "attribute", "displayName": "Uri", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the uri of the endpoint to send to." },
-    "disabled": { "kind": "attribute", "displayName": "Disabled", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
-    "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
-    "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" }
-  }
-}
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/inOut.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/inOut.json
deleted file mode 100644
index dd818bae199..00000000000
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/inOut.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "model": {
-    "kind": "model",
-    "name": "inOut",
-    "title": "In Out",
-    "description": "Marks the exchange pattern for the route to request\/reply",
-    "deprecated": true,
-    "label": "eip,routing",
-    "javaType": "org.apache.camel.model.InOutDefinition",
-    "abstract": false,
-    "input": true,
-    "output": false
-  },
-  "properties": {
-    "uri": { "kind": "attribute", "displayName": "Uri", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the uri of the endpoint to send to." },
-    "disabled": { "kind": "attribute", "displayName": "Disabled", "label": "advanced", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether to disable this EIP from the route during build time. Once an EIP has been disabled then it cannot be enabled later at runtime." },
-    "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" },
-    "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" }
-  }
-}
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/jaxb.index b/core/camel-core-model/src/generated/resources/org/apache/camel/model/jaxb.index
index 520b73327a1..9eb184c435f 100644
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/jaxb.index
+++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/jaxb.index
@@ -23,8 +23,6 @@ GlobalOptionDefinition
 GlobalOptionsDefinition
 IdempotentConsumerDefinition
 IdentifiedType
-InOnlyDefinition
-InOutDefinition
 InputTypeDefinition
 InterceptDefinition
 InterceptFromDefinition
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/InOnlyDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/InOnlyDefinition.java
deleted file mode 100644
index c1fdcd83b12..00000000000
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/InOnlyDefinition.java
+++ /dev/null
@@ -1,66 +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.model;
-
-import jakarta.xml.bind.annotation.XmlAccessType;
-import jakarta.xml.bind.annotation.XmlAccessorType;
-import jakarta.xml.bind.annotation.XmlRootElement;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.ExchangePattern;
-import org.apache.camel.spi.Metadata;
-
-/**
- * Marks the exchange pattern for the route to one way
- */
-@Metadata(label = "eip,routing")
-@XmlRootElement(name = "inOnly")
-@XmlAccessorType(XmlAccessType.FIELD)
-@Deprecated
-public class InOnlyDefinition extends SendDefinition<InOnlyDefinition> {
-
-    public InOnlyDefinition() {
-    }
-
-    public InOnlyDefinition(String uri) {
-        setUri(uri);
-    }
-
-    public InOnlyDefinition(Endpoint endpoint) {
-        setEndpoint(endpoint);
-    }
-
-    @Override
-    public String toString() {
-        return "InOnly[" + getLabel() + "]";
-    }
-
-    @Override
-    public String getShortName() {
-        return "inOnly";
-    }
-
-    @Override
-    public String getLabel() {
-        return "inOnly";
-    }
-
-    @Override
-    public String getPattern() {
-        return ExchangePattern.InOnly.name();
-    }
-}
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/InOutDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/InOutDefinition.java
deleted file mode 100644
index ab3b5755fac..00000000000
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/InOutDefinition.java
+++ /dev/null
@@ -1,66 +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.model;
-
-import jakarta.xml.bind.annotation.XmlAccessType;
-import jakarta.xml.bind.annotation.XmlAccessorType;
-import jakarta.xml.bind.annotation.XmlRootElement;
-
-import org.apache.camel.Endpoint;
-import org.apache.camel.ExchangePattern;
-import org.apache.camel.spi.Metadata;
-
-/**
- * Marks the exchange pattern for the route to request/reply
- */
-@Metadata(label = "eip,routing")
-@XmlRootElement(name = "inOut")
-@XmlAccessorType(XmlAccessType.FIELD)
-@Deprecated
-public class InOutDefinition extends SendDefinition<InOutDefinition> {
-
-    public InOutDefinition() {
-    }
-
-    public InOutDefinition(String uri) {
-        setUri(uri);
-    }
-
-    public InOutDefinition(Endpoint endpoint) {
-        setEndpoint(endpoint);
-    }
-
-    @Override
-    public String toString() {
-        return "InOut[" + getLabel() + "]";
-    }
-
-    @Override
-    public String getShortName() {
-        return "inOut";
-    }
-
-    @Override
-    public String getLabel() {
-        return "inOut";
-    }
-
-    @Override
-    public String getPattern() {
-        return ExchangePattern.InOut.name();
-    }
-}
diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
index 3ece7e6ad40..0a0fe1b0bd3 100644
--- a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
+++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/ProcessorReifier.java
@@ -48,8 +48,6 @@ import org.apache.camel.model.ExecutorServiceAwareDefinition;
 import org.apache.camel.model.FilterDefinition;
 import org.apache.camel.model.FinallyDefinition;
 import org.apache.camel.model.IdempotentConsumerDefinition;
-import org.apache.camel.model.InOnlyDefinition;
-import org.apache.camel.model.InOutDefinition;
 import org.apache.camel.model.InterceptDefinition;
 import org.apache.camel.model.InterceptFromDefinition;
 import org.apache.camel.model.InterceptSendToEndpointDefinition;
@@ -214,10 +212,6 @@ public abstract class ProcessorReifier<T extends ProcessorDefinition<?>> extends
             return new FinallyReifier(route, definition);
         } else if (definition instanceof IdempotentConsumerDefinition) {
             return new IdempotentConsumerReifier(route, definition);
-        } else if (definition instanceof InOnlyDefinition) {
-            return new SendReifier(route, definition);
-        } else if (definition instanceof InOutDefinition) {
-            return new SendReifier(route, definition);
         } else if (definition instanceof InterceptFromDefinition) {
             return new InterceptFromReifier(route, definition);
         } else if (definition instanceof InterceptDefinition) {
diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index 6fc5c8fa1e5..b3d6bd27bb8 100644
--- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -482,23 +482,6 @@ public class ModelParser extends BaseParser {
             return true;
         }, outputExpressionNodeElementHandler(), noValueHandler());
     }
-    protected InOnlyDefinition doParseInOnlyDefinition() throws IOException, XmlPullParserException {
-        return doParse(new InOnlyDefinition(),
-            sendDefinitionAttributeHandler(), optionalIdentifiedDefinitionElementHandler(), noValueHandler());
-    }
-    protected <T extends SendDefinition> AttributeHandler<T> sendDefinitionAttributeHandler() {
-        return (def, key, val) -> {
-            if ("uri".equals(key)) {
-                def.setUri(val);
-                return true;
-            }
-            return processorDefinitionAttributeHandler().accept(def, key, val);
-        };
-    }
-    protected InOutDefinition doParseInOutDefinition() throws IOException, XmlPullParserException {
-        return doParse(new InOutDefinition(),
-            sendDefinitionAttributeHandler(), optionalIdentifiedDefinitionElementHandler(), noValueHandler());
-    }
     protected InputTypeDefinition doParseInputTypeDefinition() throws IOException, XmlPullParserException {
         return doParse(new InputTypeDefinition(), (def, key, val) -> {
             switch (key) {
@@ -1495,6 +1478,15 @@ public class ModelParser extends BaseParser {
             return sendDefinitionAttributeHandler().accept(def, key, val);
         }, optionalIdentifiedDefinitionElementHandler(), noValueHandler());
     }
+    protected <T extends SendDefinition> AttributeHandler<T> sendDefinitionAttributeHandler() {
+        return (def, key, val) -> {
+            if ("uri".equals(key)) {
+                def.setUri(val);
+                return true;
+            }
+            return processorDefinitionAttributeHandler().accept(def, key, val);
+        };
+    }
     protected <T extends ToDynamicDefinition> AttributeHandler<T> toDynamicDefinitionAttributeHandler() {
         return (def, key, val) -> {
             switch (key) {
@@ -3262,8 +3254,6 @@ public class ModelParser extends BaseParser {
             case "filter": return doParseFilterDefinition();
             case "doFinally": return doParseFinallyDefinition();
             case "idempotentConsumer": return doParseIdempotentConsumerDefinition();
-            case "inOnly": return doParseInOnlyDefinition();
-            case "inOut": return doParseInOutDefinition();
             case "intercept": return doParseInterceptDefinition();
             case "interceptFrom": return doParseInterceptFromDefinition();
             case "interceptSendToEndpoint": return doParseInterceptSendToEndpointDefinition();
diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
index a371d2e4679..dac620217fc 100644
--- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
+++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/out/ModelWriter.java
@@ -139,12 +139,6 @@ public class ModelWriter extends BaseWriter {
             throws IOException {
         doWriteIdempotentConsumerDefinition("idempotentConsumer", def);
     }
-    public void writeInOnlyDefinition(InOnlyDefinition def) throws IOException {
-        doWriteInOnlyDefinition("inOnly", def);
-    }
-    public void writeInOutDefinition(InOutDefinition def) throws IOException {
-        doWriteInOutDefinition("inOut", def);
-    }
     public void writeInputTypeDefinition(
             InputTypeDefinition def)
             throws IOException {
@@ -1373,24 +1367,6 @@ public class ModelWriter extends BaseWriter {
         doWriteIdentifiedTypeAttributes(def);
         endElement();
     }
-    protected void doWriteInOnlyDefinition(
-            String name,
-            InOnlyDefinition def)
-            throws IOException {
-        startElement(name);
-        doWriteSendDefinitionAttributes(def);
-        doWriteOptionalIdentifiedDefinitionElements(def);
-        endElement();
-    }
-    protected void doWriteInOutDefinition(
-            String name,
-            InOutDefinition def)
-            throws IOException {
-        startElement(name);
-        doWriteSendDefinitionAttributes(def);
-        doWriteOptionalIdentifiedDefinitionElements(def);
-        endElement();
-    }
     protected void doWriteInputTypeDefinition(
             String name,
             InputTypeDefinition def)
@@ -4704,8 +4680,6 @@ public class ModelWriter extends BaseWriter {
                 case "FinallyDefinition" -> doWriteFinallyDefinition("doFinally", (FinallyDefinition) v);
                 case "FromDefinition" -> doWriteFromDefinition("from", (FromDefinition) v);
                 case "IdempotentConsumerDefinition" -> doWriteIdempotentConsumerDefinition("idempotentConsumer", (IdempotentConsumerDefinition) v);
-                case "InOnlyDefinition" -> doWriteInOnlyDefinition("inOnly", (InOnlyDefinition) v);
-                case "InOutDefinition" -> doWriteInOutDefinition("inOut", (InOutDefinition) v);
                 case "InputTypeDefinition" -> doWriteInputTypeDefinition("inputType", (InputTypeDefinition) v);
                 case "InterceptDefinition" -> doWriteInterceptDefinition("intercept", (InterceptDefinition) v);
                 case "InterceptFromDefinition" -> doWriteInterceptFromDefinition("interceptFrom", (InterceptFromDefinition) v);
@@ -4807,8 +4781,6 @@ public class ModelWriter extends BaseWriter {
                 case "FilterDefinition" -> doWriteFilterDefinition("filter", (FilterDefinition) v);
                 case "FinallyDefinition" -> doWriteFinallyDefinition("doFinally", (FinallyDefinition) v);
                 case "IdempotentConsumerDefinition" -> doWriteIdempotentConsumerDefinition("idempotentConsumer", (IdempotentConsumerDefinition) v);
-                case "InOnlyDefinition" -> doWriteInOnlyDefinition("inOnly", (InOnlyDefinition) v);
-                case "InOutDefinition" -> doWriteInOutDefinition("inOut", (InOutDefinition) v);
                 case "InterceptDefinition" -> doWriteInterceptDefinition("intercept", (InterceptDefinition) v);
                 case "InterceptFromDefinition" -> doWriteInterceptFromDefinition("interceptFrom", (InterceptFromDefinition) v);
                 case "InterceptSendToEndpointDefinition" -> doWriteInterceptSendToEndpointDefinition("interceptSendToEndpoint", (InterceptSendToEndpointDefinition) v);
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc b/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc
index a6b564c66f5..514469aadc9 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc
@@ -73,6 +73,11 @@ We have removed deprecated APIs such as the following:
 - Removed `org.apache.camel.spi.OnCamelContextStart`. Use `org.apache.camel.spi.OnCamelContextStarting` instead.
 - Removed `org.apache.camel.spi.OnCamelContextStop`. Use `org.apache.camel.spi.OnCamelContextStopping` instead.
 
+== EIP Changes
+
+The `InOnly` and `InOut` EIPs has been removed.
+Instead, use `SetExchangePattern` or `To` where you can specify exchange pattern to use.
+
 == YAML DSL
 
 The backwards compatible mode Camel 3.14 or older, which allowed to have _steps_ as child to _route_ has been removed.
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index af3f0182ab6..d2310da3ebe 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -30,8 +30,6 @@ import org.apache.camel.model.FinallyDefinition;
 import org.apache.camel.model.GlobalOptionDefinition;
 import org.apache.camel.model.GlobalOptionsDefinition;
 import org.apache.camel.model.IdempotentConsumerDefinition;
-import org.apache.camel.model.InOnlyDefinition;
-import org.apache.camel.model.InOutDefinition;
 import org.apache.camel.model.InputTypeDefinition;
 import org.apache.camel.model.InterceptDefinition;
 import org.apache.camel.model.InterceptFromDefinition;
@@ -6345,156 +6343,6 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
         }
     }
 
-    @YamlType(
-            nodes = {
-                    "in-only",
-                    "inOnly"
-            },
-            inline = true,
-            types = org.apache.camel.model.InOnlyDefinition.class,
-            order = org.apache.camel.dsl.yaml.common.YamlDeserializerResolver.ORDER_LOWEST - 1,
-            properties = {
-                    @YamlProperty(name = "description", type = "string"),
-                    @YamlProperty(name = "disabled", type = "boolean"),
-                    @YamlProperty(name = "id", type = "string"),
-                    @YamlProperty(name = "inherit-error-handler", type = "boolean"),
-                    @YamlProperty(name = "parameters", type = "object"),
-                    @YamlProperty(name = "uri", type = "string", required = true)
-            }
-    )
-    public static class InOnlyDefinitionDeserializer extends YamlDeserializerEndpointAwareBase<InOnlyDefinition> {
-        public InOnlyDefinitionDeserializer() {
-            super(InOnlyDefinition.class);
-        }
-
-        @Override
-        protected InOnlyDefinition newInstance() {
-            return new InOnlyDefinition();
-        }
-
-        @Override
-        protected InOnlyDefinition newInstance(String value) {
-            return new InOnlyDefinition(value);
-        }
-
-        @Override
-        protected void setEndpointUri(CamelContext camelContext, Node node, InOnlyDefinition target,
-                Map<String, Object> parameters) {
-            target.setUri(org.apache.camel.dsl.yaml.common.YamlSupport.createEndpointUri(camelContext, node, target.getUri(), parameters));
-        }
-
-        @Override
-        protected boolean setProperty(InOnlyDefinition target, String propertyKey,
-                String propertyName, Node node) {
-            switch(propertyKey) {
-                case "disabled": {
-                    String val = asText(node);
-                    target.setDisabled(val);
-                    break;
-                }
-                case "inherit-error-handler": {
-                    String val = asText(node);
-                    target.setInheritErrorHandler(java.lang.Boolean.valueOf(val));
-                    break;
-                }
-                case "uri": {
-                    String val = asText(node);
-                    target.setUri(val);
-                    break;
-                }
-                case "id": {
-                    String val = asText(node);
-                    target.setId(val);
-                    break;
-                }
-                case "description": {
-                    org.apache.camel.model.DescriptionDefinition val = asType(node, org.apache.camel.model.DescriptionDefinition.class);
-                    target.setDescription(val);
-                    break;
-                }
-                default: {
-                    return false;
-                }
-            }
-            return true;
-        }
-    }
-
-    @YamlType(
-            nodes = {
-                    "in-out",
-                    "inOut"
-            },
-            inline = true,
-            types = org.apache.camel.model.InOutDefinition.class,
-            order = org.apache.camel.dsl.yaml.common.YamlDeserializerResolver.ORDER_LOWEST - 1,
-            properties = {
-                    @YamlProperty(name = "description", type = "string"),
-                    @YamlProperty(name = "disabled", type = "boolean"),
-                    @YamlProperty(name = "id", type = "string"),
-                    @YamlProperty(name = "inherit-error-handler", type = "boolean"),
-                    @YamlProperty(name = "parameters", type = "object"),
-                    @YamlProperty(name = "uri", type = "string", required = true)
-            }
-    )
-    public static class InOutDefinitionDeserializer extends YamlDeserializerEndpointAwareBase<InOutDefinition> {
-        public InOutDefinitionDeserializer() {
-            super(InOutDefinition.class);
-        }
-
-        @Override
-        protected InOutDefinition newInstance() {
-            return new InOutDefinition();
-        }
-
-        @Override
-        protected InOutDefinition newInstance(String value) {
-            return new InOutDefinition(value);
-        }
-
-        @Override
-        protected void setEndpointUri(CamelContext camelContext, Node node, InOutDefinition target,
-                Map<String, Object> parameters) {
-            target.setUri(org.apache.camel.dsl.yaml.common.YamlSupport.createEndpointUri(camelContext, node, target.getUri(), parameters));
-        }
-
-        @Override
-        protected boolean setProperty(InOutDefinition target, String propertyKey,
-                String propertyName, Node node) {
-            switch(propertyKey) {
-                case "disabled": {
-                    String val = asText(node);
-                    target.setDisabled(val);
-                    break;
-                }
-                case "inherit-error-handler": {
-                    String val = asText(node);
-                    target.setInheritErrorHandler(java.lang.Boolean.valueOf(val));
-                    break;
-                }
-                case "uri": {
-                    String val = asText(node);
-                    target.setUri(val);
-                    break;
-                }
-                case "id": {
-                    String val = asText(node);
-                    target.setId(val);
-                    break;
-                }
-                case "description": {
-                    org.apache.camel.model.DescriptionDefinition val = asType(node, org.apache.camel.model.DescriptionDefinition.class);
-                    target.setDescription(val);
-                    break;
-                }
-                default: {
-                    return false;
-                }
-            }
-            return true;
-        }
-    }
-
     @YamlType(
             nodes = {
                     "input-type",
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
index 5c5ccd43fda..d3dbc50422c 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializersResolver.java
@@ -179,12 +179,6 @@ public final class ModelDeserializersResolver implements YamlDeserializerResolve
             case "idempotent-consumer": return new ModelDeserializers.IdempotentConsumerDefinitionDeserializer();
             case "idempotentConsumer": return new ModelDeserializers.IdempotentConsumerDefinitionDeserializer();
             case "org.apache.camel.model.IdempotentConsumerDefinition": return new ModelDeserializers.IdempotentConsumerDefinitionDeserializer();
-            case "in-only": return new ModelDeserializers.InOnlyDefinitionDeserializer();
-            case "inOnly": return new ModelDeserializers.InOnlyDefinitionDeserializer();
-            case "org.apache.camel.model.InOnlyDefinition": return new ModelDeserializers.InOnlyDefinitionDeserializer();
-            case "in-out": return new ModelDeserializers.InOutDefinitionDeserializer();
-            case "inOut": return new ModelDeserializers.InOutDefinitionDeserializer();
-            case "org.apache.camel.model.InOutDefinition": return new ModelDeserializers.InOutDefinitionDeserializer();
             case "input-type": return new ModelDeserializers.InputTypeDefinitionDeserializer();
             case "inputType": return new ModelDeserializers.InputTypeDefinitionDeserializer();
             case "org.apache.camel.model.InputTypeDefinition": return new ModelDeserializers.InputTypeDefinitionDeserializer();
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
index 559dd9f522d..286fa0df97f 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
@@ -68,18 +68,6 @@
           "idempotentConsumer" : {
             "$ref" : "#/items/definitions/org.apache.camel.model.IdempotentConsumerDefinition"
           },
-          "in-only" : {
-            "$ref" : "#/items/definitions/org.apache.camel.model.InOnlyDefinition"
-          },
-          "inOnly" : {
-            "$ref" : "#/items/definitions/org.apache.camel.model.InOnlyDefinition"
-          },
-          "in-out" : {
-            "$ref" : "#/items/definitions/org.apache.camel.model.InOutDefinition"
-          },
-          "inOut" : {
-            "$ref" : "#/items/definitions/org.apache.camel.model.InOutDefinition"
-          },
           "intercept" : {
             "$ref" : "#/items/definitions/org.apache.camel.model.InterceptDefinition"
           },
@@ -1150,62 +1138,6 @@
         },
         "required" : [ "idempotent-repository" ]
       },
-      "org.apache.camel.model.InOnlyDefinition" : {
-        "oneOf" : [ {
-          "type" : "string"
-        }, {
-          "type" : "object",
-          "properties" : {
-            "description" : {
-              "type" : "string"
-            },
-            "disabled" : {
-              "type" : "boolean"
-            },
-            "id" : {
-              "type" : "string"
-            },
-            "inherit-error-handler" : {
-              "type" : "boolean"
-            },
-            "parameters" : {
-              "type" : "object"
-            },
-            "uri" : {
-              "type" : "string"
-            }
-          }
-        } ],
-        "required" : [ "uri" ]
-      },
-      "org.apache.camel.model.InOutDefinition" : {
-        "oneOf" : [ {
-          "type" : "string"
-        }, {
-          "type" : "object",
-          "properties" : {
-            "description" : {
-              "type" : "string"
-            },
-            "disabled" : {
-              "type" : "boolean"
-            },
-            "id" : {
-              "type" : "string"
-            },
-            "inherit-error-handler" : {
-              "type" : "boolean"
-            },
-            "parameters" : {
-              "type" : "object"
-            },
-            "uri" : {
-              "type" : "string"
-            }
-          }
-        } ],
-        "required" : [ "uri" ]
-      },
       "org.apache.camel.model.InputTypeDefinition" : {
         "type" : "object",
         "properties" : {
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
index a5361e7c7a7..6c44512e54b 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
@@ -47,12 +47,6 @@
           "idempotentConsumer" : {
             "$ref" : "#/items/definitions/org.apache.camel.model.IdempotentConsumerDefinition"
           },
-          "inOnly" : {
-            "$ref" : "#/items/definitions/org.apache.camel.model.InOnlyDefinition"
-          },
-          "inOut" : {
-            "$ref" : "#/items/definitions/org.apache.camel.model.InOutDefinition"
-          },
           "intercept" : {
             "$ref" : "#/items/definitions/org.apache.camel.model.InterceptDefinition"
           },
@@ -1054,62 +1048,6 @@
         },
         "required" : [ "idempotentRepository" ]
       },
-      "org.apache.camel.model.InOnlyDefinition" : {
-        "oneOf" : [ {
-          "type" : "string"
-        }, {
-          "type" : "object",
-          "properties" : {
-            "description" : {
-              "type" : "string"
-            },
-            "disabled" : {
-              "type" : "boolean"
-            },
-            "id" : {
-              "type" : "string"
-            },
-            "inheritErrorHandler" : {
-              "type" : "boolean"
-            },
-            "parameters" : {
-              "type" : "object"
-            },
-            "uri" : {
-              "type" : "string"
-            }
-          }
-        } ],
-        "required" : [ "uri" ]
-      },
-      "org.apache.camel.model.InOutDefinition" : {
-        "oneOf" : [ {
-          "type" : "string"
-        }, {
-          "type" : "object",
-          "properties" : {
-            "description" : {
-              "type" : "string"
-            },
-            "disabled" : {
-              "type" : "boolean"
-            },
-            "id" : {
-              "type" : "string"
-            },
-            "inheritErrorHandler" : {
-              "type" : "boolean"
-            },
-            "parameters" : {
-              "type" : "object"
-            },
-            "uri" : {
-              "type" : "string"
-            }
-          }
-        } ],
-        "required" : [ "uri" ]
-      },
       "org.apache.camel.model.InputTypeDefinition" : {
         "type" : "object",
         "properties" : {


[camel] 04/04: CAMEL-19090: Remove deprecated apis in core

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit c90c8cc48a32859280a4db330f3d6dd601820db1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Feb 27 10:13:55 2023 +0100

    CAMEL-19090: Remove deprecated apis in core
---
 .../apache/camel/spring/SpringCamelContextShutdownAfterBeanTest.xml | 6 +++---
 .../camel/spring/SpringCamelContextShutdownBeforeBeanTest.xml       | 6 +++---
 .../org/apache/camel/spring/processor/setExchangePattern.xml        | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/SpringCamelContextShutdownAfterBeanTest.xml b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/SpringCamelContextShutdownAfterBeanTest.xml
index 82da287f367..7e0b35cbd0f 100644
--- a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/SpringCamelContextShutdownAfterBeanTest.xml
+++ b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/SpringCamelContextShutdownAfterBeanTest.xml
@@ -37,13 +37,13 @@
   <camelContext id="myCamel" shutdownEager="false" xmlns="http://camel.apache.org/schema/spring">
     <route>
       <from uri="seda:start"/>
-      <to uri="bean:a?cache=false"/>
-      <to uri="bean:b?cache=false"/>
+      <to uri="bean:a?scope=Prototype"/>
+      <to uri="bean:b?scope=Prototype"/>
       <to uri="mock:first"/>
       <delay>
         <constant>1000</constant>
       </delay>
-      <to uri="bean:c?cache=false"/>
+      <to uri="bean:c?scope=Prototype"/>
       <to uri="mock:result"/>
     </route>
   </camelContext>
diff --git a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/SpringCamelContextShutdownBeforeBeanTest.xml b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/SpringCamelContextShutdownBeforeBeanTest.xml
index 7711a49f9a4..d27e2ddc9f4 100644
--- a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/SpringCamelContextShutdownBeforeBeanTest.xml
+++ b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/SpringCamelContextShutdownBeforeBeanTest.xml
@@ -36,13 +36,13 @@
   <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring">
     <route>
       <from uri="seda:start"/>
-      <to uri="bean:a?cache=false"/>
-      <to uri="bean:b?cache=false"/>
+      <to uri="bean:a?scope=Prototype"/>
+      <to uri="bean:b?scope=Prototype"/>
       <to uri="mock:first"/>
       <delay>
         <constant>1000</constant>
       </delay>
-      <to uri="bean:c?cache=false"/>
+      <to uri="bean:c?scope=Prototype"/>
       <to uri="mock:result"/>
     </route>
   </camelContext>
diff --git a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePattern.xml b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePattern.xml
index 9d1bf90bbb7..fae8df36587 100644
--- a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePattern.xml
+++ b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/processor/setExchangePattern.xml
@@ -29,13 +29,13 @@
     <!-- Send the exchange as InOnly -->
     <route>
       <from uri="direct:testInOut"/>
-      <to uri="mock:result" pattern=InOut"/>
+      <to uri="mock:result" pattern="InOut"/>
     </route>
 
     <!-- Send the exchange as InOnly -->
     <route>
       <from uri="direct:testInOnly"/>
-      <to uri="mock:result" pattern=InOnly"/>
+      <to uri="mock:result" pattern="InOnly"/>
     </route>
 
 


[camel] 03/04: CAMEL-19090: Remove deprecated apis in core

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 5d52a6d907699fcf22d3b1bcd3861456017a6ff1
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Feb 27 09:52:43 2023 +0100

    CAMEL-19090: Remove deprecated apis in core
---
 .../main/java/org/apache/camel/builder/BuilderSupport.java | 14 +++++++-------
 .../java/org/apache/camel/model/ProcessorDefinition.java   |  2 --
 .../test/java/org/apache/camel/language/TokenizerTest.java |  4 ++--
 3 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/BuilderSupport.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/BuilderSupport.java
index a788478b293..efd82afa711 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/builder/BuilderSupport.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/BuilderSupport.java
@@ -352,9 +352,9 @@ public abstract class BuilderSupport implements CamelContextAware {
     /**
      * Resolves the given URI to an endpoint
      *
-     * @param      uri                     the uri to resolve
-     * @throws     NoSuchEndpointException if the endpoint URI could not be resolved
-     * @return                             the endpoint
+     * @param  uri                     the uri to resolve
+     * @throws NoSuchEndpointException if the endpoint URI could not be resolved
+     * @return                         the endpoint
      */
     public Endpoint endpoint(String uri) throws NoSuchEndpointException {
         ObjectHelper.notNull(uri, "uri");
@@ -368,10 +368,10 @@ public abstract class BuilderSupport implements CamelContextAware {
     /**
      * Resolves the given URI to an endpoint of the specified type
      *
-     * @param      uri                     the uri to resolve
-     * @param      type                    the excepted type of the endpoint
-     * @throws     NoSuchEndpointException if the endpoint URI could not be resolved
-     * @return                             the endpoint
+     * @param  uri                     the uri to resolve
+     * @param  type                    the excepted type of the endpoint
+     * @throws NoSuchEndpointException if the endpoint URI could not be resolved
+     * @return                         the endpoint
      */
     public <T extends Endpoint> T endpoint(String uri, Class<T> type) throws NoSuchEndpointException {
         ObjectHelper.notNull(uri, "uri");
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java
index 547c0eecea8..5e1519d9b97 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java
@@ -19,12 +19,10 @@ package org.apache.camel.model;
 import java.time.Duration;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Comparator;
 import java.util.Deque;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.function.Function;
 import java.util.function.Supplier;
diff --git a/core/camel-core/src/test/java/org/apache/camel/language/TokenizerTest.java b/core/camel-core/src/test/java/org/apache/camel/language/TokenizerTest.java
index 37f87997594..2e4f055e929 100644
--- a/core/camel-core/src/test/java/org/apache/camel/language/TokenizerTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/language/TokenizerTest.java
@@ -78,7 +78,7 @@ public class TokenizerTest extends ExchangeTestSupport {
 
     @Test
     public void testTokenizeHeaderWithStringConstructor() throws Exception {
-        List<?> names = tokenize(",", "names").evaluate(exchange, List.class);
+        List<?> names = tokenize("names", ",").evaluate(exchange, List.class);
         assertEquals(3, names.size());
 
         assertEquals("Claus", names.get(0));
@@ -88,7 +88,7 @@ public class TokenizerTest extends ExchangeTestSupport {
 
     @Test
     public void testTokenizeHeader() throws Exception {
-        Expression exp = tokenize(",", "names");
+        Expression exp = tokenize("names", ",");
         exp.init(context);
 
         List<?> names = exp.evaluate(exchange, List.class);


[camel] 01/04: CAMEL-19090: Remove deprecated apis in core

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1a066bd9aee518304c406b827e860445324bfefa
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Feb 27 08:57:58 2023 +0100

    CAMEL-19090: Remove deprecated apis in core
---
 .../org/apache/camel/builder/BuilderSupport.java   |   2 -
 .../apache/camel/model/ProcessorDefinition.java    | 215 +--------------------
 .../scheduler/SchedulerBlockingManualTest.java     |   5 +-
 3 files changed, 4 insertions(+), 218 deletions(-)

diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/BuilderSupport.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/BuilderSupport.java
index f333a90f21b..a788478b293 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/builder/BuilderSupport.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/BuilderSupport.java
@@ -355,7 +355,6 @@ public abstract class BuilderSupport implements CamelContextAware {
      * @param      uri                     the uri to resolve
      * @throws     NoSuchEndpointException if the endpoint URI could not be resolved
      * @return                             the endpoint
-     * @deprecated                         use {@link CamelContext#getEndpoint(String)} instead
      */
     public Endpoint endpoint(String uri) throws NoSuchEndpointException {
         ObjectHelper.notNull(uri, "uri");
@@ -373,7 +372,6 @@ public abstract class BuilderSupport implements CamelContextAware {
      * @param      type                    the excepted type of the endpoint
      * @throws     NoSuchEndpointException if the endpoint URI could not be resolved
      * @return                             the endpoint
-     * @deprecated                         use {@link CamelContext#getEndpoint(String, Class)} instead
      */
     public <T extends Endpoint> T endpoint(String uri, Class<T> type) throws NoSuchEndpointException {
         ObjectHelper.notNull(uri, "uri");
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java
index 0d0481d80db..547c0eecea8 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/ProcessorDefinition.java
@@ -498,20 +498,6 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
         return asType();
     }
 
-    /**
-     * Sends the exchange to a list of endpoints
-     *
-     * @param  endpoints list of endpoints to send to
-     * @return           the builder
-     */
-    @Deprecated
-    public Type to(Iterable<Endpoint> endpoints) {
-        for (Endpoint endpoint : endpoints) {
-            addOutput(new ToDefinition(endpoint));
-        }
-        return asType();
-    }
-
     /**
      * Sends the exchange to a list of endpoints
      *
@@ -557,21 +543,6 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
         return asType();
     }
 
-    /**
-     * Sends the exchange to a list of endpoints
-     *
-     * @param  pattern   the pattern to use for the message exchanges
-     * @param  endpoints list of endpoints to send to
-     * @return           the builder
-     */
-    @Deprecated
-    public Type to(ExchangePattern pattern, Iterable<Endpoint> endpoints) {
-        for (Endpoint endpoint : endpoints) {
-            addOutput(new ToDefinition(endpoint, pattern));
-        }
-        return asType();
-    }
-
     /**
      * Sends the exchange to a list of endpoints
      * <p/>
@@ -616,156 +587,6 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
         return asType();
     }
 
-    /**
-     * Sends the message to the given endpoint using an <a href="http://camel.apache.org/event-message.html">Event
-     * Message</a> or <a href="http://camel.apache.org/exchange-pattern.html">InOnly exchange pattern</a>
-     * <p/>
-     * Notice the existing MEP is restored after the message has been sent to the given endpoint.
-     *
-     * @param      uri The endpoint uri which is used for sending the exchange
-     * @return         the builder
-     * @deprecated     use to where you can specify the exchange pattern as well
-     */
-    @Deprecated
-    public Type inOnly(@AsEndpointUri String uri) {
-        return to(ExchangePattern.InOnly, uri);
-    }
-
-    /**
-     * Sends the message to the given endpoint using an <a href="http://camel.apache.org/event-message.html">Event
-     * Message</a> or <a href="http://camel.apache.org/exchange-pattern.html">InOnly exchange pattern</a>
-     * <p/>
-     * Notice the existing MEP is restored after the message has been sent to the given endpoint.
-     *
-     * @param      endpoint The endpoint which is used for sending the exchange
-     * @return              the builder
-     * @deprecated          use to where you can specify the exchange pattern as well
-     */
-    @Deprecated
-    public Type inOnly(Endpoint endpoint) {
-        return to(ExchangePattern.InOnly, endpoint);
-    }
-
-    /**
-     * Sends the message to the given endpoints using an <a href="http://camel.apache.org/event-message.html">Event
-     * Message</a> or <a href="http://camel.apache.org/exchange-pattern.html">InOnly exchange pattern</a>
-     * <p/>
-     * Notice the existing MEP is restored after the message has been sent to the given endpoint.
-     *
-     * @param      uris list of endpoints to send to
-     * @return          the builder
-     * @deprecated      use to where you can specify the exchange pattern as well
-     */
-    @Deprecated
-    public Type inOnly(@AsEndpointUri String... uris) {
-        return to(ExchangePattern.InOnly, uris);
-    }
-
-    /**
-     * Sends the message to the given endpoints using an <a href="http://camel.apache.org/event-message.html">Event
-     * Message</a> or <a href="http://camel.apache.org/exchange-pattern.html">InOnly exchange pattern</a>
-     * <p/>
-     * Notice the existing MEP is restored after the message has been sent to the given endpoint.
-     *
-     * @param      endpoints list of endpoints to send to
-     * @return               the builder
-     * @deprecated           use to where you can specify the exchange pattern as well
-     */
-    @Deprecated
-    public Type inOnly(@AsEndpointUri Endpoint... endpoints) {
-        return to(ExchangePattern.InOnly, endpoints);
-    }
-
-    /**
-     * Sends the message to the given endpoints using an <a href="http://camel.apache.org/event-message.html">Event
-     * Message</a> or <a href="http://camel.apache.org/exchange-pattern.html">InOnly exchange pattern</a>
-     * <p/>
-     * Notice the existing MEP is restored after the message has been sent to the given endpoint.
-     *
-     * @param      endpoints list of endpoints to send to
-     * @return               the builder
-     * @deprecated           use to where you can specify the exchange pattern as well
-     */
-    @Deprecated
-    public Type inOnly(Iterable<Endpoint> endpoints) {
-        return to(ExchangePattern.InOnly, endpoints);
-    }
-
-    /**
-     * Sends the message to the given endpoint using an <a href="http://camel.apache.org/request-reply.html">Request
-     * Reply</a> or <a href="http://camel.apache.org/exchange-pattern.html">InOut exchange pattern</a>
-     * <p/>
-     * Notice the existing MEP is restored after the message has been sent to the given endpoint.
-     *
-     * @param      uri The endpoint uri which is used for sending the exchange
-     * @return         the builder
-     * @deprecated     use to where you can specify the exchange pattern as well
-     */
-    @Deprecated
-    public Type inOut(@AsEndpointUri String uri) {
-        return to(ExchangePattern.InOut, uri);
-    }
-
-    /**
-     * Sends the message to the given endpoint using an <a href="http://camel.apache.org/request-reply.html">Request
-     * Reply</a> or <a href="http://camel.apache.org/exchange-pattern.html">InOut exchange pattern</a>
-     * <p/>
-     * Notice the existing MEP is restored after the message has been sent to the given endpoint.
-     *
-     * @param      endpoint The endpoint which is used for sending the exchange
-     * @return              the builder
-     * @deprecated          use to where you can specify the exchange pattern as well
-     */
-    @Deprecated
-    public Type inOut(Endpoint endpoint) {
-        return to(ExchangePattern.InOut, endpoint);
-    }
-
-    /**
-     * Sends the message to the given endpoints using an <a href="http://camel.apache.org/request-reply.html">Request
-     * Reply</a> or <a href="http://camel.apache.org/exchange-pattern.html">InOut exchange pattern</a>
-     * <p/>
-     * Notice the existing MEP is restored after the message has been sent to the given endpoint.
-     *
-     * @param      uris list of endpoints to send to
-     * @return          the builder
-     * @deprecated      use to where you can specify the exchange pattern as well
-     */
-    @Deprecated
-    public Type inOut(@AsEndpointUri String... uris) {
-        return to(ExchangePattern.InOut, uris);
-    }
-
-    /**
-     * Sends the message to the given endpoints using an <a href="http://camel.apache.org/request-reply.html">Request
-     * Reply</a> or <a href="http://camel.apache.org/exchange-pattern.html">InOut exchange pattern</a>
-     * <p/>
-     * Notice the existing MEP is restored after the message has been sent to the given endpoint.
-     *
-     * @param      endpoints list of endpoints to send to
-     * @return               the builder
-     * @deprecated           use to where you can specify the exchange pattern as well
-     */
-    @Deprecated
-    public Type inOut(Endpoint... endpoints) {
-        return to(ExchangePattern.InOut, endpoints);
-    }
-
-    /**
-     * Sends the message to the given endpoints using an <a href="http://camel.apache.org/request-reply.html">Request
-     * Reply</a> or <a href="http://camel.apache.org/exchange-pattern.html">InOut exchange pattern</a>
-     * <p/>
-     * Notice the existing MEP is restored after the message has been sent to the given endpoint.
-     *
-     * @param      endpoints list of endpoints to send to
-     * @return               the builder
-     * @deprecated           use to where you can specify the exchange pattern as well
-     */
-    @Deprecated
-    public Type inOut(Iterable<Endpoint> endpoints) {
-        return to(ExchangePattern.InOut, endpoints);
-    }
-
     /**
      * Sets the id of this node.
      * <p/>
@@ -1044,24 +865,6 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
         return asType();
     }
 
-    /**
-     * <a href="https://camel.apache.org/components/latest/eips/pipeline-eip.html">Pipes and Filters EIP:</a> Creates a
-     * {@link org.apache.camel.processor.Pipeline} of the list of endpoints so that the message will get processed by
-     * each endpoint in turn and for request/response the output of one endpoint will be the input of the next endpoint
-     *
-     * @param  endpoints list of endpoints
-     * @return           the builder
-     */
-    @Deprecated
-    public Type pipeline(Collection<Endpoint> endpoints) {
-        PipelineDefinition answer = new PipelineDefinition();
-        for (Endpoint endpoint : endpoints) {
-            answer.addOutput(new ToDefinition(endpoint));
-        }
-        addOutput(answer);
-        return asType();
-    }
-
     /**
      * Continues processing the {@link org.apache.camel.Exchange} using asynchronous routing engine.
      *
@@ -1711,7 +1514,7 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
      * @return the builder
      */
     public SamplingDefinition sample() {
-        return sample(1, TimeUnit.SECONDS);
+        return sample(Duration.ofSeconds(1));
     }
 
     /**
@@ -1742,22 +1545,6 @@ public abstract class ProcessorDefinition<Type extends ProcessorDefinition<Type>
         return answer;
     }
 
-    /**
-     * <a href="http://camel.apache.org/sampling.html">Sampling Throttler</a> Creates a sampling throttler allowing you
-     * to extract a sample of exchanges from the traffic through a route. It is configured with a sampling period during
-     * which only a single exchange is allowed to pass through. All other exchanges will be stopped.
-     *
-     * @param  samplePeriod this is the sample interval, only one exchange is allowed through in this interval
-     * @param  unit         this is the units for the samplePeriod e.g. Seconds
-     * @return              the builder
-     */
-    @Deprecated
-    public SamplingDefinition sample(long samplePeriod, TimeUnit unit) {
-        SamplingDefinition answer = new SamplingDefinition(samplePeriod, unit);
-        addOutput(answer);
-        return answer;
-    }
-
     /**
      * <a href="http://camel.apache.org/sampling.html">Sampling Throttler</a> Creates a sampling throttler allowing you
      * to extract a sample of exchanges from the traffic through a route. It is configured with a sampling message
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/scheduler/SchedulerBlockingManualTest.java b/core/camel-core/src/test/java/org/apache/camel/component/scheduler/SchedulerBlockingManualTest.java
index 1324c73ed02..687028e0a29 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/scheduler/SchedulerBlockingManualTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/scheduler/SchedulerBlockingManualTest.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.scheduler;
 
 import org.apache.camel.ContextTestSupport;
+import org.apache.camel.ExchangePattern;
 import org.apache.camel.builder.RouteBuilder;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
@@ -40,14 +41,14 @@ public class SchedulerBlockingManualTest extends ContextTestSupport {
                 from("scheduler://trigger?delay=2000&repeatCount=3").routeId("scheduler")
                         .threads(10)
                         .log("1")
-                        .inOut("seda:route1")
+                        .to(ExchangePattern.InOut, "seda:route1")
                         .log("1.1");
 
                 from("seda:route1?concurrentConsumers=2").routeId("first route")
                         .log("2")
                         .delay(5000)
                         .log("2.1")
-                        .inOut("seda:route2")
+                        .to(ExchangePattern.InOut, "seda:route2")
                         .log("2.2");
 
                 from("seda:route2").routeId("second route")