This is an automated email from the ASF dual-hosted git repository.
zhfeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 2bc28173e95 CAMEL-21396: introduce camel-fury format (#16110)
2bc28173e95 is described below
commit 2bc28173e9527a4c38e821a0b7e2f5acd94afbbb
Author: Zheng Feng <[email protected]>
AuthorDate: Tue Oct 29 19:25:35 2024 +0800
CAMEL-21396: introduce camel-fury format (#16110)
---
bom/camel-bom/pom.xml | 5 +
catalog/camel-allcomponents/pom.xml | 5 +
.../apache/camel/catalog/dataformats.properties | 1 +
.../org/apache/camel/catalog/dataformats/fury.json | 22 ++++
.../org/apache/camel/catalog/models.properties | 1 +
.../org/apache/camel/catalog/models/fury.json | 19 ++++
.../apache/camel/catalog/schemas/camel-spring.xsd | 25 +++++
components/camel-fury/pom.xml | 62 ++++++++++
.../component/fury/FuryDataFormatConfigurer.java | 30 +++++
.../org/apache/camel/component/fury/fury.json | 22 ++++
.../org/apache/camel/configurer/fury-dataformat | 2 +
.../org/apache/camel/dataformat.properties | 7 ++
.../services/org/apache/camel/dataformat/fury | 2 +
.../camel-fury/src/main/docs/fury-dataformat.adoc | 44 ++++++++
.../camel/component/fury/FuryDataFormat.java | 125 +++++++++++++++++++++
.../org/apache/camel/component/fury/FuryTest.java | 56 +++++++++
.../org/apache/camel/component/fury/TestPojo.java | 45 ++++++++
.../src/test/resources/log4j2.properties | 28 +++++
components/pom.xml | 1 +
.../org/apache/camel/model/dataformat/fury.json | 19 ++++
.../services/org/apache/camel/model.properties | 1 +
.../org/apache/camel/model/dataformat/jaxb.index | 1 +
.../org/apache/camel/builder/DataFormatClause.java | 18 +++
.../camel/model/dataformat/FuryDataFormat.java | 101 +++++++++++++++++
.../org/apache/camel/main/dataformats.properties | 1 +
.../java/org/apache/camel/xml/in/ModelParser.java | 7 ++
.../java/org/apache/camel/xml/out/ModelWriter.java | 9 ++
.../org/apache/camel/yaml/out/ModelWriter.java | 9 ++
.../modules/dataformats/examples/json/fury.json | 1 +
docs/components/modules/dataformats/nav.adoc | 1 +
.../modules/dataformats/pages/fury-dataformat.adoc | 1 +
.../dsl/yaml/deserializers/ModelDeserializers.java | 46 ++++++++
.../deserializers/ModelDeserializersResolver.java | 2 +
.../generated/resources/schema/camelYamlDsl.json | 18 +++
parent/pom.xml | 6 +
35 files changed, 743 insertions(+)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 8cfe8024e90..76070c7d72d 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -817,6 +817,11 @@
<artifactId>camel-ftp</artifactId>
<version>4.9.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-fury</artifactId>
+ <version>4.9.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-geocoder</artifactId>
diff --git a/catalog/camel-allcomponents/pom.xml
b/catalog/camel-allcomponents/pom.xml
index 1be613cbc73..b2a24b6b6df 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -691,6 +691,11 @@
<artifactId>camel-ftp</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-fury</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-geocoder</artifactId>
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties
index ca8d6981a6e..78c60922b0b 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties
@@ -14,6 +14,7 @@ fastjson
fhirJson
fhirXml
flatpack
+fury
grok
gson
gzipDeflater
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fury.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fury.json
new file mode 100644
index 00000000000..6f4c41b0b83
--- /dev/null
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/fury.json
@@ -0,0 +1,22 @@
+{
+ "dataformat": {
+ "kind": "dataformat",
+ "name": "fury",
+ "title": "Fury",
+ "description": "Serialize and deserialize messages using Apache Fury",
+ "deprecated": false,
+ "firstVersion": "4.9.0",
+ "label": "dataformat,transformation",
+ "javaType": "org.apache.camel.component.fury.FuryDataFormat",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-fury",
+ "version": "4.9.0-SNAPSHOT",
+ "modelName": "fury",
+ "modelJavaType": "org.apache.camel.model.dataformat.FuryDataFormat"
+ },
+ "properties": {
+ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
+ "unmarshalType": { "index": 1, "kind": "attribute", "displayName":
"Unmarshal Type", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Class of the java type to use when
unmarshalling" }
+ }
+}
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 9631a0ce180..3b65a58958b 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
@@ -54,6 +54,7 @@ fhirXml
filter
flatpack
from
+fury
get
globalOption
globalOptions
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fury.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fury.json
new file mode 100644
index 00000000000..fdf3e5c1679
--- /dev/null
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/fury.json
@@ -0,0 +1,19 @@
+{
+ "model": {
+ "kind": "model",
+ "name": "fury",
+ "title": "Fury",
+ "description": "Serialize and deserialize messages using Apache Fury",
+ "deprecated": false,
+ "firstVersion": "4.9.0",
+ "label": "dataformat,transformation",
+ "javaType": "org.apache.camel.model.dataformat.FuryDataFormat",
+ "abstract": false,
+ "input": false,
+ "output": false
+ },
+ "properties": {
+ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
+ "unmarshalType": { "index": 1, "kind": "attribute", "displayName":
"Unmarshal Type", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Class of the java type to use when
unmarshalling" }
+ }
+}
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 3879096bf10..0ecfd8f141f 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
@@ -568,6 +568,15 @@ Configures a org.apache.camel.FluentProducerTemplate
<xs:documentation xml:lang="en">
<![CDATA[
Act as a message source as input to a route
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="fury" type="tns:furyDataFormat">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Serialize and deserialize messages using Apache Fury
]]>
</xs:documentation>
</xs:annotation>
@@ -16787,6 +16796,22 @@ Set a reference to a custom Expression to use.
</xs:choice>
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="furyDataFormat">
+ <xs:complexContent>
+ <xs:extension base="tns:dataFormat">
+ <xs:sequence/>
+ <xs:attribute name="unmarshalType" type="xs:string">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+<![CDATA[
+Class of the java type to use when unmarshalling.
+]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
<xs:complexType name="cSimpleExpression">
<xs:simpleContent>
<xs:extension base="tns:typedExpressionDefinition"/>
diff --git a/components/camel-fury/pom.xml b/components/camel-fury/pom.xml
new file mode 100644
index 00000000000..d2342704d25
--- /dev/null
+++ b/components/camel-fury/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>components</artifactId>
+ <version>4.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-fury</artifactId>
+ <packaging>jar</packaging>
+ <name>Camel :: Fury</name>
+ <description>Camel Fury support</description>
+
+ <properties>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-support</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.fury</groupId>
+ <artifactId>fury-core</artifactId>
+ <version>${fury-version}</version>
+ </dependency>
+
+ <!-- testing -->
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-spring-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
diff --git
a/components/camel-fury/src/generated/java/org/apache/camel/component/fury/FuryDataFormatConfigurer.java
b/components/camel-fury/src/generated/java/org/apache/camel/component/fury/FuryDataFormatConfigurer.java
new file mode 100644
index 00000000000..410e6907033
--- /dev/null
+++
b/components/camel-fury/src/generated/java/org/apache/camel/component/fury/FuryDataFormatConfigurer.java
@@ -0,0 +1,30 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.fury;
+
+import javax.annotation.processing.Generated;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.PackageDataFormatMojo")
+@SuppressWarnings("unchecked")
+public class FuryDataFormatConfigurer extends PropertyConfigurerSupport
implements GeneratedPropertyConfigurer {
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object target, String
name, Object value, boolean ignoreCase) {
+ FuryDataFormat dataformat = (FuryDataFormat) target;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "unmarshaltype":
+ case "unmarshalType":
dataformat.setUnmarshalType(property(camelContext, java.lang.Class.class,
value)); return true;
+ default: return false;
+ }
+ }
+
+}
+
diff --git
a/components/camel-fury/src/generated/resources/META-INF/org/apache/camel/component/fury/fury.json
b/components/camel-fury/src/generated/resources/META-INF/org/apache/camel/component/fury/fury.json
new file mode 100644
index 00000000000..6f4c41b0b83
--- /dev/null
+++
b/components/camel-fury/src/generated/resources/META-INF/org/apache/camel/component/fury/fury.json
@@ -0,0 +1,22 @@
+{
+ "dataformat": {
+ "kind": "dataformat",
+ "name": "fury",
+ "title": "Fury",
+ "description": "Serialize and deserialize messages using Apache Fury",
+ "deprecated": false,
+ "firstVersion": "4.9.0",
+ "label": "dataformat,transformation",
+ "javaType": "org.apache.camel.component.fury.FuryDataFormat",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-fury",
+ "version": "4.9.0-SNAPSHOT",
+ "modelName": "fury",
+ "modelJavaType": "org.apache.camel.model.dataformat.FuryDataFormat"
+ },
+ "properties": {
+ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
+ "unmarshalType": { "index": 1, "kind": "attribute", "displayName":
"Unmarshal Type", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Class of the java type to use when
unmarshalling" }
+ }
+}
diff --git
a/components/camel-fury/src/generated/resources/META-INF/services/org/apache/camel/configurer/fury-dataformat
b/components/camel-fury/src/generated/resources/META-INF/services/org/apache/camel/configurer/fury-dataformat
new file mode 100644
index 00000000000..d4719ed2a9c
--- /dev/null
+++
b/components/camel-fury/src/generated/resources/META-INF/services/org/apache/camel/configurer/fury-dataformat
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.fury.FuryDataFormatConfigurer
diff --git
a/components/camel-fury/src/generated/resources/META-INF/services/org/apache/camel/dataformat.properties
b/components/camel-fury/src/generated/resources/META-INF/services/org/apache/camel/dataformat.properties
new file mode 100644
index 00000000000..c34372416c7
--- /dev/null
+++
b/components/camel-fury/src/generated/resources/META-INF/services/org/apache/camel/dataformat.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+dataFormats=fury
+groupId=org.apache.camel
+artifactId=camel-fury
+version=4.9.0-SNAPSHOT
+projectName=Camel :: Fury
+projectDescription=Camel Fury support
diff --git
a/components/camel-fury/src/generated/resources/META-INF/services/org/apache/camel/dataformat/fury
b/components/camel-fury/src/generated/resources/META-INF/services/org/apache/camel/dataformat/fury
new file mode 100644
index 00000000000..9f7d48352b6
--- /dev/null
+++
b/components/camel-fury/src/generated/resources/META-INF/services/org/apache/camel/dataformat/fury
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.fury.FuryDataFormat
diff --git a/components/camel-fury/src/main/docs/fury-dataformat.adoc
b/components/camel-fury/src/main/docs/fury-dataformat.adoc
new file mode 100644
index 00000000000..008e4f610aa
--- /dev/null
+++ b/components/camel-fury/src/main/docs/fury-dataformat.adoc
@@ -0,0 +1,44 @@
+= Fury DataFormat
+:doctitle: Fury
+:shortname: fury
+:artifactid: camel-fury
+:description: Serialize and deserialize messages using Apache Fury
+:since: 4.9
+:supportlevel: Preview
+:tabs-sync-option:
+//Manually maintained attributes
+:camel-spring-boot-name: fury
+
+*Since Camel {since}*
+
+Fury is a Data Format that uses the
+https://fury.apache.org/[Fury Library]
+
+== Fury Options
+
+
+// dataformat options: START
+include::partial$dataformat-options.adoc[]
+// dataformat options: END
+
+
+== Dependencies
+
+To use Fury in your camel routes, you need to add the dependency
+on *camel-fury* which implements this data format.
+
+If you use maven, you could add the following to your `pom.xml`,
+substituting the version number for the latest & greatest release.
+
+[source,xml]
+----------------------------------------------------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-fury</artifactId>
+ <version>x.x.x</version>
+ <!-- use the same version as your Camel core version -->
+</dependency>
+----------------------------------------------------------
+
+
+include::spring-boot:partial$starter.adoc[]
diff --git
a/components/camel-fury/src/main/java/org/apache/camel/component/fury/FuryDataFormat.java
b/components/camel-fury/src/main/java/org/apache/camel/component/fury/FuryDataFormat.java
new file mode 100644
index 00000000000..d6c58cd17ca
--- /dev/null
+++
b/components/camel-fury/src/main/java/org/apache/camel/component/fury/FuryDataFormat.java
@@ -0,0 +1,125 @@
+/*
+ * 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.fury;
+
+import java.io.*;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.CamelContextAware;
+import org.apache.camel.Exchange;
+import org.apache.camel.spi.DataFormat;
+import org.apache.camel.spi.DataFormatName;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Dataformat;
+import org.apache.camel.support.service.ServiceSupport;
+import org.apache.fury.Fury;
+import org.apache.fury.config.Language;
+import org.apache.fury.io.FuryInputStream;
+
+/**
+ * Serialize and deserialize messages using <a
href="https://fury.apache.org">Apache Fury</a>
+ */
+@Dataformat("fury")
+@Metadata(firstVersion = "4.9.0", title = "Fury")
+public class FuryDataFormat extends ServiceSupport implements DataFormat,
DataFormatName, CamelContextAware {
+
+ private CamelContext camelContext;
+ /**
+ * Class of the java type to use when unmarshalling
+ */
+ private Class<?> unmarshalType;
+ private String unmarshalTypeName;
+
+ private Fury fury;
+
+ public FuryDataFormat() {
+ this(Object.class);
+ }
+
+ public FuryDataFormat(Class<?> unmarshalType) {
+ this.unmarshalType = unmarshalType;
+ }
+
+ @Override
+ public CamelContext getCamelContext() {
+ return camelContext;
+ }
+
+ @Override
+ public void setCamelContext(CamelContext camelContext) {
+ this.camelContext = camelContext;
+ }
+
+ @Override
+ public String getDataFormatName() {
+ return "fury";
+ }
+
+ @Override
+ public void marshal(final Exchange exchange, final Object graph, final
OutputStream stream) throws Exception {
+ fury.serialize(stream, graph);
+ }
+
+ @Override
+ public Object unmarshal(Exchange exchange, InputStream stream) throws
Exception {
+ return fury.deserialize(new FuryInputStream(stream));
+ }
+
+ @Override
+ protected void doInit() throws Exception {
+ if (unmarshalTypeName != null && (unmarshalType == null ||
unmarshalType == Object.class)) {
+ unmarshalType =
camelContext.getClassResolver().resolveClass(unmarshalTypeName);
+ }
+
+ fury =
Fury.builder().withLanguage(Language.JAVA).requireClassRegistration(true).build();
+ if (unmarshalType != null) {
+ fury.register(unmarshalType);
+ }
+ }
+
+ @Override
+ protected void doStart() throws Exception {
+ }
+
+ @Override
+ protected void doStop() throws Exception {
+ // noop
+ }
+
+ // Properties
+ //
-------------------------------------------------------------------------
+
+ public Class<?> getUnmarshalType() {
+ return this.unmarshalType;
+ }
+
+ /**
+ * Class of the java type to use when unmarshalling
+ */
+ public void setUnmarshalType(Class<?> unmarshalType) {
+ this.unmarshalType = unmarshalType;
+ }
+
+ public String getUnmarshalTypeName() {
+ return unmarshalTypeName;
+ }
+
+ public void setUnmarshalTypeName(String unmarshalTypeName) {
+ this.unmarshalTypeName = unmarshalTypeName;
+ }
+
+}
diff --git
a/components/camel-fury/src/test/java/org/apache/camel/component/fury/FuryTest.java
b/components/camel-fury/src/test/java/org/apache/camel/component/fury/FuryTest.java
new file mode 100644
index 00000000000..70e23687e42
--- /dev/null
+++
b/components/camel-fury/src/test/java/org/apache/camel/component/fury/FuryTest.java
@@ -0,0 +1,56 @@
+/*
+ * 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.fury;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+public class FuryTest extends CamelTestSupport {
+
+ @Test
+ public void testMarshalAndUnmarshalMap() throws Exception {
+ TestPojo pojo = new TestPojo();
+ pojo.setName("camel");
+
+ MockEndpoint mock = getMockEndpoint("mock:reverse");
+ mock.expectedMessageCount(1);
+ mock.message(0).body().isInstanceOf(TestPojo.class);
+ mock.message(0).body().isEqualTo(pojo);
+
+ Object marshalled = template.requestBody("direct:in", pojo);
+ template.sendBody("direct:back", marshalled);
+
+ mock.assertIsSatisfied();
+ }
+
+ @Override
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ @Override
+ public void configure() {
+ FuryDataFormat format = new FuryDataFormat();
+ format.setUnmarshalType(TestPojo.class);
+
+ from("direct:in").marshal(format);
+ from("direct:back").unmarshal(format).to("mock:reverse");
+ }
+ };
+ }
+
+}
diff --git
a/components/camel-fury/src/test/java/org/apache/camel/component/fury/TestPojo.java
b/components/camel-fury/src/test/java/org/apache/camel/component/fury/TestPojo.java
new file mode 100644
index 00000000000..d649b1bbdac
--- /dev/null
+++
b/components/camel-fury/src/test/java/org/apache/camel/component/fury/TestPojo.java
@@ -0,0 +1,45 @@
+/*
+ * 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.fury;
+
+public class TestPojo {
+
+ private String name;
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ return this.name.equals(((TestPojo) obj).getName());
+ }
+
+ @Override
+ public int hashCode() {
+ return name != null ? name.hashCode() : 0;
+ }
+
+ @Override
+ public String toString() {
+ return "TestPojo[" + name + "]";
+ }
+}
diff --git a/components/camel-fury/src/test/resources/log4j2.properties
b/components/camel-fury/src/test/resources/log4j2.properties
new file mode 100644
index 00000000000..adbb3ca5808
--- /dev/null
+++ b/components/camel-fury/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-fury-test.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = DEBUG
+rootLogger.appenderRef.file.ref = file
diff --git a/components/pom.xml b/components/pom.xml
index e865a52f2a4..60e932d39b8 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -138,6 +138,7 @@
<module>camel-fop</module>
<module>camel-freemarker</module>
<module>camel-ftp</module>
+ <module>camel-fury</module>
<module>camel-geocoder</module>
<module>camel-git</module>
<module>camel-github</module>
diff --git
a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fury.json
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fury.json
new file mode 100644
index 00000000000..fdf3e5c1679
--- /dev/null
+++
b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/fury.json
@@ -0,0 +1,19 @@
+{
+ "model": {
+ "kind": "model",
+ "name": "fury",
+ "title": "Fury",
+ "description": "Serialize and deserialize messages using Apache Fury",
+ "deprecated": false,
+ "firstVersion": "4.9.0",
+ "label": "dataformat,transformation",
+ "javaType": "org.apache.camel.model.dataformat.FuryDataFormat",
+ "abstract": false,
+ "input": false,
+ "output": false
+ },
+ "properties": {
+ "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group":
"common", "required": false, "type": "string", "javaType": "java.lang.String",
"deprecated": false, "autowired": false, "secret": false, "description": "The
id of this node" },
+ "unmarshalType": { "index": 1, "kind": "attribute", "displayName":
"Unmarshal Type", "group": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "description": "Class of the java type to use when
unmarshalling" }
+ }
+}
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 d7144297bbf..1e3759b073f 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
@@ -55,6 +55,7 @@ fhirXml
filter
flatpack
from
+fury
get
globalOption
globalOptions
diff --git
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/jaxb.index
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/jaxb.index
index e2e8c68bb92..dea60412239 100644
---
a/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/jaxb.index
+++
b/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/jaxb.index
@@ -15,6 +15,7 @@ DataFormatsDefinition
FhirJsonDataFormat
FhirXmlDataFormat
FlatpackDataFormat
+FuryDataFormat
GrokDataFormat
GzipDeflaterDataFormat
HL7DataFormat
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
b/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
index 328891add7c..714845138fc 100644
---
a/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
+++
b/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
@@ -36,6 +36,7 @@ import org.apache.camel.model.dataformat.CsvDataFormat;
import org.apache.camel.model.dataformat.CustomDataFormat;
import org.apache.camel.model.dataformat.FhirJsonDataFormat;
import org.apache.camel.model.dataformat.FhirXmlDataFormat;
+import org.apache.camel.model.dataformat.FuryDataFormat;
import org.apache.camel.model.dataformat.GrokDataFormat;
import org.apache.camel.model.dataformat.GzipDeflaterDataFormat;
import org.apache.camel.model.dataformat.HL7DataFormat;
@@ -304,6 +305,23 @@ public class DataFormatClause<T extends
ProcessorDefinition<?>> {
return dataFormat(new CustomDataFormat(ref));
}
+ /**
+ * Use the Fury data format
+ */
+ public T fury() {
+ return dataFormat(new FuryDataFormat());
+ }
+
+ /**
+ * Use the Fury data format with the given unmarshalType
+ */
+
+ public T fury(Class type) {
+ FuryDataFormat format = new FuryDataFormat();
+ format.setUnmarshalType(type);
+ return dataFormat(format);
+ }
+
/**
* Uses the Grok data format
*/
diff --git
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FuryDataFormat.java
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FuryDataFormat.java
new file mode 100644
index 00000000000..dfe17fcfd4b
--- /dev/null
+++
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/FuryDataFormat.java
@@ -0,0 +1,101 @@
+/*
+ * 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.dataformat;
+
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlTransient;
+
+import org.apache.camel.builder.DataFormatBuilder;
+import org.apache.camel.model.DataFormatDefinition;
+import org.apache.camel.spi.Metadata;
+
+/**
+ * Serialize and deserialize messages using Apache Fury
+ */
+@Metadata(firstVersion = "4.9.0", label = "dataformat,transformation", title =
"Fury")
+@XmlRootElement(name = "fury")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class FuryDataFormat extends DataFormatDefinition {
+ @XmlTransient
+ private Class<?> unmarshalType;
+
+ @XmlAttribute(name = "unmarshalType")
+ @Metadata(description = "Class of the java type to use when unmarshalling")
+ private String unmarshalTypeName;
+
+ public FuryDataFormat() {
+ super("fury");
+ }
+
+ public FuryDataFormat(FuryDataFormat source) {
+ super(source);
+ this.unmarshalType = source.unmarshalType;
+ this.unmarshalTypeName = source.unmarshalTypeName;
+ }
+
+ private FuryDataFormat(Builder builder) {
+ this.unmarshalTypeName = builder.unmarshalTypeName;
+ }
+
+ @Override
+ public FuryDataFormat copyDefinition() {
+ return new FuryDataFormat(this);
+ }
+
+ public Class<?> getUnmarshalType() {
+ return unmarshalType;
+ }
+
+ /**
+ * Class of the java type to use when unmarshalling
+ */
+ public void setUnmarshalType(final Class<?> unmarshalType) {
+ this.unmarshalType = unmarshalType;
+ }
+
+ public String getUnmarshalTypeName() {
+ return unmarshalTypeName;
+ }
+
+ public void setUnmarshalTypeName(final String unmarshalTypeName) {
+ this.unmarshalTypeName = unmarshalTypeName;
+ }
+
+ /**
+ * {@code Builder} is a specific builder for {@link FuryDataFormat}.
+ */
+ @XmlTransient
+ public static class Builder implements DataFormatBuilder<FuryDataFormat> {
+ private String unmarshalTypeName;
+
+ /**
+ * Class of the java type to use when unmarshalling
+ */
+ public Builder unmarshalType(String unmarshalTypeName) {
+ this.unmarshalTypeName = unmarshalTypeName;
+ return this;
+ }
+
+ @Override
+ public FuryDataFormat end() {
+ return new FuryDataFormat(this);
+ }
+ }
+}
diff --git
a/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties
b/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties
index ca8d6981a6e..78c60922b0b 100644
---
a/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties
+++
b/core/camel-main/src/generated/resources/org/apache/camel/main/dataformats.properties
@@ -14,6 +14,7 @@ fastjson
fhirJson
fhirXml
flatpack
+fury
grok
gson
gzipDeflater
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 479084a27a3..164f8153e4f 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
@@ -1840,6 +1840,12 @@ public class ModelParser extends BaseParser {
default: yield identifiedTypeAttributeHandler().accept(def,
key, val);
}, noElementHandler(), noValueHandler());
}
+ protected FuryDataFormat doParseFuryDataFormat() throws IOException,
XmlPullParserException {
+ return doParse(new FuryDataFormat(), (def, key, val) -> switch (key) {
+ case "unmarshalType": def.setUnmarshalTypeName(val); yield
true;
+ default: yield identifiedTypeAttributeHandler().accept(def,
key, val);
+ }, noElementHandler(), noValueHandler());
+ }
protected GrokDataFormat doParseGrokDataFormat() throws IOException,
XmlPullParserException {
return doParse(new GrokDataFormat(), (def, key, val) -> switch (key) {
case "allowMultipleMatchesPerLine":
def.setAllowMultipleMatchesPerLine(val); yield true;
@@ -2841,6 +2847,7 @@ public class ModelParser extends BaseParser {
case "fhirJson": return doParseFhirJsonDataFormat();
case "fhirXml": return doParseFhirXmlDataFormat();
case "flatpack": return doParseFlatpackDataFormat();
+ case "fury": return doParseFuryDataFormat();
case "grok": return doParseGrokDataFormat();
case "gzipDeflater": return doParseGzipDeflaterDataFormat();
case "hl7": return doParseHL7DataFormat();
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 ce5841617db..517c4a9c495 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
@@ -478,6 +478,9 @@ public class ModelWriter extends BaseWriter {
public void writeFlatpackDataFormat(FlatpackDataFormat def) throws
IOException {
doWriteFlatpackDataFormat("flatpack", def);
}
+ public void writeFuryDataFormat(FuryDataFormat def) throws IOException {
+ doWriteFuryDataFormat("fury", def);
+ }
public void writeGrokDataFormat(GrokDataFormat def) throws IOException {
doWriteGrokDataFormat("grok", def);
}
@@ -2546,6 +2549,12 @@ public class ModelWriter extends BaseWriter {
doWriteAttribute("ignoreExtraColumns", def.getIgnoreExtraColumns());
endElement(name);
}
+ protected void doWriteFuryDataFormat(String name, FuryDataFormat def)
throws IOException {
+ startElement(name);
+ doWriteIdentifiedTypeAttributes(def);
+ doWriteAttribute("unmarshalType", def.getUnmarshalTypeName());
+ endElement(name);
+ }
protected void doWriteGrokDataFormat(String name, GrokDataFormat def)
throws IOException {
startElement(name);
doWriteIdentifiedTypeAttributes(def);
diff --git
a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
index 75466431c09..1a1dd38a85d 100644
---
a/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
+++
b/core/camel-yaml-io/src/generated/java/org/apache/camel/yaml/out/ModelWriter.java
@@ -478,6 +478,9 @@ public class ModelWriter extends BaseWriter {
public void writeFlatpackDataFormat(FlatpackDataFormat def) throws
IOException {
doWriteFlatpackDataFormat("flatpack", def);
}
+ public void writeFuryDataFormat(FuryDataFormat def) throws IOException {
+ doWriteFuryDataFormat("fury", def);
+ }
public void writeGrokDataFormat(GrokDataFormat def) throws IOException {
doWriteGrokDataFormat("grok", def);
}
@@ -2546,6 +2549,12 @@ public class ModelWriter extends BaseWriter {
doWriteAttribute("ignoreExtraColumns", def.getIgnoreExtraColumns());
endElement(name);
}
+ protected void doWriteFuryDataFormat(String name, FuryDataFormat def)
throws IOException {
+ startElement(name);
+ doWriteIdentifiedTypeAttributes(def);
+ doWriteAttribute("unmarshalType", def.getUnmarshalTypeName());
+ endElement(name);
+ }
protected void doWriteGrokDataFormat(String name, GrokDataFormat def)
throws IOException {
startElement(name);
doWriteIdentifiedTypeAttributes(def);
diff --git a/docs/components/modules/dataformats/examples/json/fury.json
b/docs/components/modules/dataformats/examples/json/fury.json
new file mode 120000
index 00000000000..89f636e73bb
--- /dev/null
+++ b/docs/components/modules/dataformats/examples/json/fury.json
@@ -0,0 +1 @@
+../../../../../../components/camel-fury/src/generated/resources/META-INF/org/apache/camel/component/fury/fury.json
\ No newline at end of file
diff --git a/docs/components/modules/dataformats/nav.adoc
b/docs/components/modules/dataformats/nav.adoc
index 053d0ae1f71..1f77edd26cc 100644
--- a/docs/components/modules/dataformats/nav.adoc
+++ b/docs/components/modules/dataformats/nav.adoc
@@ -15,6 +15,7 @@
** xref:fhirJson-dataformat.adoc[FHIR JSon]
** xref:fhirXml-dataformat.adoc[FHIR XML]
** xref:flatpack-dataformat.adoc[Flatpack]
+** xref:fury-dataformat.adoc[Fury]
** xref:grok-dataformat.adoc[Grok]
** xref:gzipDeflater-dataformat.adoc[GZip Deflater]
** xref:hl7-dataformat.adoc[HL7]
diff --git a/docs/components/modules/dataformats/pages/fury-dataformat.adoc
b/docs/components/modules/dataformats/pages/fury-dataformat.adoc
new file mode 120000
index 00000000000..f54d2089424
--- /dev/null
+++ b/docs/components/modules/dataformats/pages/fury-dataformat.adoc
@@ -0,0 +1 @@
+../../../../../components/camel-fury/src/main/docs/fury-dataformat.adoc
\ No newline at end of file
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 2c8db785ea2..e9e1d4df46d 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
@@ -149,6 +149,7 @@ import
org.apache.camel.model.dataformat.DataFormatsDefinition;
import org.apache.camel.model.dataformat.FhirJsonDataFormat;
import org.apache.camel.model.dataformat.FhirXmlDataFormat;
import org.apache.camel.model.dataformat.FlatpackDataFormat;
+import org.apache.camel.model.dataformat.FuryDataFormat;
import org.apache.camel.model.dataformat.GrokDataFormat;
import org.apache.camel.model.dataformat.GzipDeflaterDataFormat;
import org.apache.camel.model.dataformat.HL7DataFormat;
@@ -6270,6 +6271,51 @@ public final class ModelDeserializers extends
YamlDeserializerSupport {
}
}
+ @YamlType(
+ nodes = "fury",
+ types = org.apache.camel.model.dataformat.FuryDataFormat.class,
+ order =
org.apache.camel.dsl.yaml.common.YamlDeserializerResolver.ORDER_LOWEST - 1,
+ displayName = "Fury",
+ description = "Serialize and deserialize messages using Apache
Fury",
+ deprecated = false,
+ properties = {
+ @YamlProperty(name = "id", type = "string", description =
"The id of this node", displayName = "Id"),
+ @YamlProperty(name = "unmarshalType", type = "string",
description = "Class of the java type to use when unmarshalling", displayName =
"Unmarshal Type")
+ }
+ )
+ public static class FuryDataFormatDeserializer extends
YamlDeserializerBase<FuryDataFormat> {
+ public FuryDataFormatDeserializer() {
+ super(FuryDataFormat.class);
+ }
+
+ @Override
+ protected FuryDataFormat newInstance() {
+ return new FuryDataFormat();
+ }
+
+ @Override
+ protected boolean setProperty(FuryDataFormat target, String
propertyKey,
+ String propertyName, Node node) {
+ propertyKey =
org.apache.camel.util.StringHelper.dashToCamelCase(propertyKey);
+ switch(propertyKey) {
+ case "id": {
+ String val = asText(node);
+ target.setId(val);
+ break;
+ }
+ case "unmarshalType": {
+ String val = asText(node);
+ target.setUnmarshalTypeName(val);
+ break;
+ }
+ default: {
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
@YamlType(
nodes = "get",
types = org.apache.camel.model.rest.GetDefinition.class,
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 359f651bf7a..c9d8970a616 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
@@ -164,6 +164,8 @@ public final class ModelDeserializersResolver implements
YamlDeserializerResolve
case "org.apache.camel.model.FinallyDefinition": return new
ModelDeserializers.FinallyDefinitionDeserializer();
case "flatpack": return new
ModelDeserializers.FlatpackDataFormatDeserializer();
case "org.apache.camel.model.dataformat.FlatpackDataFormat":
return new ModelDeserializers.FlatpackDataFormatDeserializer();
+ case "fury": return new
ModelDeserializers.FuryDataFormatDeserializer();
+ case "org.apache.camel.model.dataformat.FuryDataFormat": return
new ModelDeserializers.FuryDataFormatDeserializer();
case "get": return new
ModelDeserializers.GetDefinitionDeserializer();
case "org.apache.camel.model.rest.GetDefinition": return new
ModelDeserializers.GetDefinitionDeserializer();
case "global-option": return new
ModelDeserializers.GlobalOptionDefinitionDeserializer();
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 648c27fed13..9fad0efa3dc 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
@@ -10910,6 +10910,24 @@
}
}
},
+ "org.apache.camel.model.dataformat.FuryDataFormat" : {
+ "title" : "Fury",
+ "description" : "Serialize and deserialize messages using Apache Fury",
+ "type" : "object",
+ "additionalProperties" : false,
+ "properties" : {
+ "id" : {
+ "type" : "string",
+ "title" : "Id",
+ "description" : "The id of this node"
+ },
+ "unmarshalType" : {
+ "type" : "string",
+ "title" : "Unmarshal Type",
+ "description" : "Class of the java type to use when unmarshalling"
+ }
+ }
+ },
"org.apache.camel.model.dataformat.GrokDataFormat" : {
"title" : "Grok",
"description" : "Unmarshal unstructured data to objects using Logstash
based Grok patterns.",
diff --git a/parent/pom.xml b/parent/pom.xml
index a7bb3798efa..fd9bb49599b 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -158,6 +158,7 @@
<formatter-maven-plugin-version>2.24.1</formatter-maven-plugin-version>
<ftpserver-version>1.2.0</ftpserver-version>
<freemarker-version>2.3.33</freemarker-version>
+ <fury-version>0.8.0</fury-version>
<geronimo-annotation-1.0-spec-version>1.1.1</geronimo-annotation-1.0-spec-version>
<geronimo-annotation-1.2-spec-version>1.0</geronimo-annotation-1.2-spec-version>
<geronimo-atinject-1.0-spec-version>1.0</geronimo-atinject-1.0-spec-version>
@@ -1322,6 +1323,11 @@
<artifactId>camel-ftp</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-fury</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-geocoder</artifactId>