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 218ebcb4196714df479f10cf7f599d36d47a2d2a Author: Claus Ibsen <[email protected]> AuthorDate: Sat Oct 24 19:57:02 2026 +0200 CAMEL-24961: Catalog body types for the eleven hazelcast components (#28396) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../catalog/components/hazelcast-instance.json | 3 ++ .../camel/catalog/components/hazelcast-list.json | 5 +++ .../camel/catalog/components/hazelcast-map.json | 5 +++ .../catalog/components/hazelcast-multimap.json | 5 +++ .../catalog/components/hazelcast-pncounter.json | 4 +++ .../camel/catalog/components/hazelcast-queue.json | 5 +++ .../components/hazelcast-replicatedmap.json | 5 +++ .../catalog/components/hazelcast-ringbuffer.json | 4 +++ .../camel/catalog/components/hazelcast-seda.json | 5 +++ .../camel/catalog/components/hazelcast-set.json | 5 +++ .../camel/catalog/components/hazelcast-topic.json | 5 +++ .../hazelcast/instance/hazelcast-instance.json | 3 ++ .../component/hazelcast/list/hazelcast-list.json | 5 +++ .../component/hazelcast/map/hazelcast-map.json | 5 +++ .../hazelcast/multimap/hazelcast-multimap.json | 5 +++ .../hazelcast/pncounter/hazelcast-pncounter.json | 4 +++ .../component/hazelcast/queue/hazelcast-queue.json | 5 +++ .../replicatedmap/hazelcast-replicatedmap.json | 5 +++ .../hazelcast/ringbuffer/hazelcast-ringbuffer.json | 4 +++ .../component/hazelcast/seda/hazelcast-seda.json | 5 +++ .../component/hazelcast/set/hazelcast-set.json | 5 +++ .../component/hazelcast/topic/hazelcast-topic.json | 5 +++ .../instance/HazelcastInstanceEndpoint.java | 8 +++++ .../hazelcast/list/HazelcastListEndpoint.java | 30 +++++++++++++++++ .../hazelcast/map/HazelcastMapEndpoint.java | 39 ++++++++++++++++++++++ .../multimap/HazelcastMultimapEndpoint.java | 33 ++++++++++++++++++ .../pncounter/HazelcastPNCounterEndpoint.java | 13 ++++++++ .../hazelcast/queue/HazelcastQueueEndpoint.java | 32 ++++++++++++++++++ .../HazelcastReplicatedmapEndpoint.java | 28 ++++++++++++++++ .../ringbuffer/HazelcastRingbufferEndpoint.java | 22 ++++++++++++ .../hazelcast/seda/HazelcastSedaEndpoint.java | 18 ++++++++++ .../hazelcast/set/HazelcastSetEndpoint.java | 20 +++++++++++ .../hazelcast/topic/HazelcastTopicEndpoint.java | 13 ++++++++ 33 files changed, 358 insertions(+) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-instance.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-instance.json index 7259d2237e7c..999b222689ee 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-instance.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-instance.json @@ -36,6 +36,9 @@ "CamelHazelcastInstanceHost": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The host name of the instance", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#INSTANCE_HOST" }, "CamelHazelcastInstancePort": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The port number of the instance", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#INSTANCE_PORT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "null" ], "description": "No body: the CamelHazelcastListenerAction header says whether a member was added to or removed from the cluster, and CamelHazelcastInstanceHost and CamelHazelcastInstancePort give its address" } + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "consumer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "de [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-list.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-list.json index 2adeda1456d5..3b3134981753 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-list.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-list.json @@ -39,6 +39,11 @@ "CamelHazelcastCacheName": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "com.hazelcast.collection.ItemEvent", "description": "The Hazelcast ItemEvent of an item added to or removed from the list, not the item: ${body.item} is the item, and the CamelHazelcastListenerAction header is added or removed" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The item that add and setValue store, at the index in the CamelHazelcastObjectIndex header when set, and that removeValue removes when the header is not set: an object Hazelcast can serialize, so a stream or no body fails. A Collection for addAll, removeAll and retainAll. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "defaultOperation", "value": "add", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "setValue", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "removeValue", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "clear", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "addAll", "carriers": [ "unchanged" ] }, { "option": "defa [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-map.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-map.json index 487e80cecb78..776191f1c24c 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-map.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-map.json @@ -42,6 +42,11 @@ "CamelHazelcastCacheName": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "unknown" ], "description": "The value of the entry for an added or updated event, as any member of the cluster stored it, and no body for removed and evicted: the key is in the CamelHazelcastObjectId header and the event in CamelHazelcastListenerAction" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The value that put, putIfAbsent and update store under the key in the CamelHazelcastObjectId header, and that containsValue looks for: an object Hazelcast can serialize, so a stream fails (convert it to bytes or text first), and no body fails. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "defaultOperation", "value": "put", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "putIfAbsent", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "update", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "delete", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "evict", "carriers": [ "unchanged" ] }, { "option": "defaul [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-multimap.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-multimap.json index 01ea1e3e17e9..04a48ed9d624 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-multimap.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-multimap.json @@ -39,6 +39,11 @@ "CamelHazelcastCacheType": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of the cache - here multimap", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_TYPE" }, "CamelHazelcastOperationType": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "unknown" ], "description": "The value of an added event, as any member of the cluster stored it, and no body for removed: the key is in the CamelHazelcastObjectId header and the event in CamelHazelcastListenerAction" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The value that put adds to the values of the key in the CamelHazelcastObjectId header, and that removeValue and containsValue look for: an object Hazelcast can serialize, so a stream fails (convert it to bytes or text first), and no body fails. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "defaultOperation", "value": "put", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "delete", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "removeValue", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "clear", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "get", "carriers": [ "list" ] }, { "option": "defaultOperati [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-pncounter.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-pncounter.json index 9c3b178d2757..68cdfc8f833a 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-pncounter.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-pncounter.json @@ -29,6 +29,10 @@ "hazelcastInstance": { "index": 2, "kind": "property", "displayName": "Hazelcast Instance", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.hazelcast.core.HazelcastInstance", "deprecated": false, "autowired": false, "secret": false, "description": "The hazelcast instance reference which can be used for hazelcast endpoint. If you don't specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast insta [...] "hazelcastMode": { "index": 3, "kind": "property", "displayName": "Hazelcast Mode", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "node", "description": "The hazelcast mode reference which kind of instance should be used. If you don't specify the mode, then the node mode will be the default." } }, + "bodyTypes": { + "producerIn": { "carriers": [ "any" ], "description": "Not used, except by getAndAdd, which adds the body, a number or the text of one, to the counter: no body fails" }, + "producerOut": { "carriers": [ "value" ], "javaType": "java.lang.Long", "byOption": [ { "option": "defaultOperation", "value": "destroy", "carriers": [ "unchanged" ] } ], "description": "The value of the counter as a Long: after the change for increment and decrement, before it for getAndAdd, and the current value for get; destroy keeps the body. The operation comes from the CamelHazelcastOperationType header, or else the defaultOperation option: without either the producer fails" } + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "de [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-queue.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-queue.json index c5d642231783..227998360619 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-queue.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-queue.json @@ -39,6 +39,11 @@ "CamelHazelcastCacheName": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "com.hazelcast.collection.ItemEvent", "byOption": [ { "option": "queueConsumerMode", "value": "poll", "carriers": [ "unknown" ] } ], "description": "In Listen mode, the default, the Hazelcast ItemEvent of an item added to or removed from the queue, not the item: ${body.item} is the item, and the CamelHazelcastListenerAction header is added or removed. In Poll mode the consumer takes the items off the queue, and the body is the item [...] + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The item that add, the default, put and offer add to the queue, and that removeValue removes (without a body it removes the head): an object Hazelcast can serialize, so a stream or no body fails. A Collection for removeAll and retainAll. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unchanged" ], "byOption": [ { "option": "defaultOperation", "value": "poll", "carriers": [ "unknown" ] }, { "option": "defaultOperation", "value": "peek", "carriers": [ "unknown" ] }, { "option": "defaultOperation", "value": "take", "carriers": [ "unknown" ] }, { "option": "defaultOperation", "value": "remainingCapacity", "carriers": [ "value" ], "javaType": "java.lang.Integer" }, { "option": "defaultOperation", "value": "drainTo", "carriers": [ "value [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-replicatedmap.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-replicatedmap.json index 242ad6f460ea..616a0a27c6c8 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-replicatedmap.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-replicatedmap.json @@ -38,6 +38,11 @@ "CamelHazelcastCacheName": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "unknown" ], "description": "The value of the entry for an added or updated event, as any member of the cluster stored it, and no body for removed: the key is in the CamelHazelcastObjectId header and the event in CamelHazelcastListenerAction" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The value that put stores under the key in the CamelHazelcastObjectId header, and that containsValue looks for: an object Hazelcast can serialize, so a stream fails (convert it to bytes or text first), and no body fails. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "defaultOperation", "value": "put", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "delete", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "clear", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "containsKey", "carriers": [ "value" ], "javaType": "java.lang.Boolean" }, { "option": "defaultOperation", "value": "containsValue", "carriers": [ [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-ringbuffer.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-ringbuffer.json index 470956368563..3a7f48017b6a 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-ringbuffer.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-ringbuffer.json @@ -32,6 +32,10 @@ "headers": { "CamelHazelcastOperationType": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The item that add appends: an object Hazelcast can serialize, so a stream or no body fails. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "defaultOperation", "value": "add", "carriers": [ "value" ], "javaType": "java.lang.Long" }, { "option": "defaultOperation", "value": "capacity", "carriers": [ "value" ], "javaType": "java.lang.Long" }, { "option": "defaultOperation", "value": "remainingCapacity", "carriers": [ "value" ], "javaType": "java.lang.Long" } ], "description": "By the operation, which the CamelHazelcastOperationType header sets, or else t [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "de [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-seda.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-seda.json index 430f9cce531e..7f0eba6c65c0 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-seda.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-seda.json @@ -30,6 +30,11 @@ "hazelcastInstance": { "index": 3, "kind": "property", "displayName": "Hazelcast Instance", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.hazelcast.core.HazelcastInstance", "deprecated": false, "autowired": false, "secret": false, "description": "The hazelcast instance reference which can be used for hazelcast endpoint. If you don't specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast insta [...] "hazelcastMode": { "index": 4, "kind": "property", "displayName": "Hazelcast Mode", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "node", "description": "The hazelcast mode reference which kind of instance should be used. If you don't specify the mode, then the node mode will be the default." } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The body the producer put on the Hazelcast queue, as Hazelcast deserializes it: a body that is not Serializable, such as a stream, arrives as bytes. With transferExchange=true on the producer the headers and exchange properties come along" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "value", "map", "list", "pojo" ], "description": "A Serializable body goes on the queue as is, and another one converted to bytes, so a stream works, but a POJO that does not convert to bytes fails, as does no body" }, + "producerOut": { "carriers": [ "unchanged" ], "description": "The producer puts the message on the queue and does not wait for the consumer, also for a message that expects a reply (InOut)" } + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-set.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-set.json index d73647198991..8beaf30aa2b3 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-set.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-set.json @@ -38,6 +38,11 @@ "CamelHazelcastCacheName": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "com.hazelcast.collection.ItemEvent", "description": "The Hazelcast ItemEvent of an item added to or removed from the set, not the item: ${body.item} is the item, and the CamelHazelcastListenerAction header is added or removed" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The item that add adds and removeValue removes: an object Hazelcast can serialize, so a stream or no body fails. A Collection for addAll, removeAll and retainAll. clear and getAll do not use the body" }, + "producerOut": { "carriers": [ "unchanged" ], "byOption": [ { "option": "defaultOperation", "value": "getAll", "carriers": [ "list" ] } ], "description": "The operations that change the set keep the body. getAll gives the Hazelcast set itself: a live distributed Set, not a copy. The operation comes from the CamelHazelcastOperationType header, or else the defaultOperation option: without either the producer fails" } + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-topic.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-topic.json index 8c71ff801df7..b9aa0e3876e0 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-topic.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hazelcast-topic.json @@ -38,6 +38,11 @@ "CamelHazelcastCacheName": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "com.hazelcast.topic.Message", "description": "The Hazelcast Message, not the published object: ${body.messageObject} is the object and ${body.publishingMember} the member that published it. The CamelHazelcastListenerAction header is received" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The object to publish: an object Hazelcast can serialize, so convert a stream to bytes or text first; no body fails" }, + "producerOut": { "carriers": [ "unchanged" ], "description": "The producer publishes the body and keeps it" } + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/instance/hazelcast-instance.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/instance/hazelcast-instance.json index 7259d2237e7c..999b222689ee 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/instance/hazelcast-instance.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/instance/hazelcast-instance.json @@ -36,6 +36,9 @@ "CamelHazelcastInstanceHost": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The host name of the instance", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#INSTANCE_HOST" }, "CamelHazelcastInstancePort": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The port number of the instance", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#INSTANCE_PORT" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "null" ], "description": "No body: the CamelHazelcastListenerAction header says whether a member was added to or removed from the cluster, and CamelHazelcastInstanceHost and CamelHazelcastInstancePort give its address" } + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "consumer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "consumer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "de [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/list/hazelcast-list.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/list/hazelcast-list.json index 2adeda1456d5..3b3134981753 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/list/hazelcast-list.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/list/hazelcast-list.json @@ -39,6 +39,11 @@ "CamelHazelcastCacheName": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "com.hazelcast.collection.ItemEvent", "description": "The Hazelcast ItemEvent of an item added to or removed from the list, not the item: ${body.item} is the item, and the CamelHazelcastListenerAction header is added or removed" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The item that add and setValue store, at the index in the CamelHazelcastObjectIndex header when set, and that removeValue removes when the header is not set: an object Hazelcast can serialize, so a stream or no body fails. A Collection for addAll, removeAll and retainAll. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "defaultOperation", "value": "add", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "setValue", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "removeValue", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "clear", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "addAll", "carriers": [ "unchanged" ] }, { "option": "defa [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/map/hazelcast-map.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/map/hazelcast-map.json index 487e80cecb78..776191f1c24c 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/map/hazelcast-map.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/map/hazelcast-map.json @@ -42,6 +42,11 @@ "CamelHazelcastCacheName": { "index": 8, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 9, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "unknown" ], "description": "The value of the entry for an added or updated event, as any member of the cluster stored it, and no body for removed and evicted: the key is in the CamelHazelcastObjectId header and the event in CamelHazelcastListenerAction" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The value that put, putIfAbsent and update store under the key in the CamelHazelcastObjectId header, and that containsValue looks for: an object Hazelcast can serialize, so a stream fails (convert it to bytes or text first), and no body fails. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "defaultOperation", "value": "put", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "putIfAbsent", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "update", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "delete", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "evict", "carriers": [ "unchanged" ] }, { "option": "defaul [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/multimap/hazelcast-multimap.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/multimap/hazelcast-multimap.json index 01ea1e3e17e9..04a48ed9d624 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/multimap/hazelcast-multimap.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/multimap/hazelcast-multimap.json @@ -39,6 +39,11 @@ "CamelHazelcastCacheType": { "index": 5, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The type of the cache - here multimap", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_TYPE" }, "CamelHazelcastOperationType": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "unknown" ], "description": "The value of an added event, as any member of the cluster stored it, and no body for removed: the key is in the CamelHazelcastObjectId header and the event in CamelHazelcastListenerAction" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The value that put adds to the values of the key in the CamelHazelcastObjectId header, and that removeValue and containsValue look for: an object Hazelcast can serialize, so a stream fails (convert it to bytes or text first), and no body fails. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "defaultOperation", "value": "put", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "delete", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "removeValue", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "clear", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "get", "carriers": [ "list" ] }, { "option": "defaultOperati [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/pncounter/hazelcast-pncounter.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/pncounter/hazelcast-pncounter.json index 9c3b178d2757..68cdfc8f833a 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/pncounter/hazelcast-pncounter.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/pncounter/hazelcast-pncounter.json @@ -29,6 +29,10 @@ "hazelcastInstance": { "index": 2, "kind": "property", "displayName": "Hazelcast Instance", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.hazelcast.core.HazelcastInstance", "deprecated": false, "autowired": false, "secret": false, "description": "The hazelcast instance reference which can be used for hazelcast endpoint. If you don't specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast insta [...] "hazelcastMode": { "index": 3, "kind": "property", "displayName": "Hazelcast Mode", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "node", "description": "The hazelcast mode reference which kind of instance should be used. If you don't specify the mode, then the node mode will be the default." } }, + "bodyTypes": { + "producerIn": { "carriers": [ "any" ], "description": "Not used, except by getAndAdd, which adds the body, a number or the text of one, to the counter: no body fails" }, + "producerOut": { "carriers": [ "value" ], "javaType": "java.lang.Long", "byOption": [ { "option": "defaultOperation", "value": "destroy", "carriers": [ "unchanged" ] } ], "description": "The value of the counter as a Long: after the change for increment and decrement, before it for getAndAdd, and the current value for get; destroy keeps the body. The operation comes from the CamelHazelcastOperationType header, or else the defaultOperation option: without either the producer fails" } + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "de [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/queue/hazelcast-queue.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/queue/hazelcast-queue.json index c5d642231783..227998360619 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/queue/hazelcast-queue.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/queue/hazelcast-queue.json @@ -39,6 +39,11 @@ "CamelHazelcastCacheName": { "index": 5, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 6, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "com.hazelcast.collection.ItemEvent", "byOption": [ { "option": "queueConsumerMode", "value": "poll", "carriers": [ "unknown" ] } ], "description": "In Listen mode, the default, the Hazelcast ItemEvent of an item added to or removed from the queue, not the item: ${body.item} is the item, and the CamelHazelcastListenerAction header is added or removed. In Poll mode the consumer takes the items off the queue, and the body is the item [...] + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The item that add, the default, put and offer add to the queue, and that removeValue removes (without a body it removes the head): an object Hazelcast can serialize, so a stream or no body fails. A Collection for removeAll and retainAll. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unchanged" ], "byOption": [ { "option": "defaultOperation", "value": "poll", "carriers": [ "unknown" ] }, { "option": "defaultOperation", "value": "peek", "carriers": [ "unknown" ] }, { "option": "defaultOperation", "value": "take", "carriers": [ "unknown" ] }, { "option": "defaultOperation", "value": "remainingCapacity", "carriers": [ "value" ], "javaType": "java.lang.Integer" }, { "option": "defaultOperation", "value": "drainTo", "carriers": [ "value [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/replicatedmap/hazelcast-replicatedmap.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/replicatedmap/hazelcast-replicatedmap.json index 242ad6f460ea..616a0a27c6c8 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/replicatedmap/hazelcast-replicatedmap.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/replicatedmap/hazelcast-replicatedmap.json @@ -38,6 +38,11 @@ "CamelHazelcastCacheName": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "unknown" ], "description": "The value of the entry for an added or updated event, as any member of the cluster stored it, and no body for removed: the key is in the CamelHazelcastObjectId header and the event in CamelHazelcastListenerAction" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The value that put stores under the key in the CamelHazelcastObjectId header, and that containsValue looks for: an object Hazelcast can serialize, so a stream fails (convert it to bytes or text first), and no body fails. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "defaultOperation", "value": "put", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "delete", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "clear", "carriers": [ "unchanged" ] }, { "option": "defaultOperation", "value": "containsKey", "carriers": [ "value" ], "javaType": "java.lang.Boolean" }, { "option": "defaultOperation", "value": "containsValue", "carriers": [ [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/ringbuffer/hazelcast-ringbuffer.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/ringbuffer/hazelcast-ringbuffer.json index 470956368563..3a7f48017b6a 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/ringbuffer/hazelcast-ringbuffer.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/ringbuffer/hazelcast-ringbuffer.json @@ -32,6 +32,10 @@ "headers": { "CamelHazelcastOperationType": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The item that add appends: an object Hazelcast can serialize, so a stream or no body fails. The other operations do not use the body" }, + "producerOut": { "carriers": [ "unknown" ], "byOption": [ { "option": "defaultOperation", "value": "add", "carriers": [ "value" ], "javaType": "java.lang.Long" }, { "option": "defaultOperation", "value": "capacity", "carriers": [ "value" ], "javaType": "java.lang.Long" }, { "option": "defaultOperation", "value": "remainingCapacity", "carriers": [ "value" ], "javaType": "java.lang.Long" } ], "description": "By the operation, which the CamelHazelcastOperationType header sets, or else t [...] + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "producer", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "de [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/seda/hazelcast-seda.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/seda/hazelcast-seda.json index 430f9cce531e..7f0eba6c65c0 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/seda/hazelcast-seda.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/seda/hazelcast-seda.json @@ -30,6 +30,11 @@ "hazelcastInstance": { "index": 3, "kind": "property", "displayName": "Hazelcast Instance", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.hazelcast.core.HazelcastInstance", "deprecated": false, "autowired": false, "secret": false, "description": "The hazelcast instance reference which can be used for hazelcast endpoint. If you don't specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast insta [...] "hazelcastMode": { "index": 4, "kind": "property", "displayName": "Hazelcast Mode", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "node", "description": "The hazelcast mode reference which kind of instance should be used. If you don't specify the mode, then the node mode will be the default." } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The body the producer put on the Hazelcast queue, as Hazelcast deserializes it: a body that is not Serializable, such as a stream, arrives as bytes. With transferExchange=true on the producer the headers and exchange properties come along" }, + "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "value", "map", "list", "pojo" ], "description": "A Serializable body goes on the queue as is, and another one converted to bytes, so a stream works, but a POJO that does not convert to bytes fails, as does no body" }, + "producerOut": { "carriers": [ "unchanged" ], "description": "The producer puts the message on the queue and does not wait for the consumer, also for a message that expects a reply (InOut)" } + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/set/hazelcast-set.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/set/hazelcast-set.json index d73647198991..8beaf30aa2b3 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/set/hazelcast-set.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/set/hazelcast-set.json @@ -38,6 +38,11 @@ "CamelHazelcastCacheName": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "com.hazelcast.collection.ItemEvent", "description": "The Hazelcast ItemEvent of an item added to or removed from the set, not the item: ${body.item} is the item, and the CamelHazelcastListenerAction header is added or removed" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The item that add adds and removeValue removes: an object Hazelcast can serialize, so a stream or no body fails. A Collection for addAll, removeAll and retainAll. clear and getAll do not use the body" }, + "producerOut": { "carriers": [ "unchanged" ], "byOption": [ { "option": "defaultOperation", "value": "getAll", "carriers": [ "list" ] } ], "description": "The operations that change the set keep the body. getAll gives the Hazelcast set itself: a live distributed Set, not a copy. The operation comes from the CamelHazelcastOperationType header, or else the defaultOperation option: without either the producer fails" } + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/topic/hazelcast-topic.json b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/topic/hazelcast-topic.json index 8c71ff801df7..b9aa0e3876e0 100644 --- a/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/topic/hazelcast-topic.json +++ b/components/camel-hazelcast/src/generated/resources/META-INF/org/apache/camel/component/hazelcast/topic/hazelcast-topic.json @@ -38,6 +38,11 @@ "CamelHazelcastCacheName": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache - e.g. foo", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#CACHE_NAME" }, "CamelHazelcastOperationType": { "index": 5, "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The operation to perform", "constantName": "org.apache.camel.component.hazelcast.HazelcastConstants#OPERATION" } }, + "bodyTypes": { + "consumerOut": { "carriers": [ "pojo" ], "javaType": "com.hazelcast.topic.Message", "description": "The Hazelcast Message, not the published object: ${body.messageObject} is the object and ${body.publishingMember} the member that published it. The CamelHazelcastListenerAction header is received" }, + "producerIn": { "carriers": [ "text", "bytes", "file", "value", "map", "list", "pojo" ], "description": "The object to publish: an object Hazelcast can serialize, so convert a stream to bytes or text first; no body fails" }, + "producerOut": { "carriers": [ "unchanged" ], "description": "The producer publishes the body and keeps it" } + }, "properties": { "cacheName": { "index": 0, "kind": "path", "displayName": "Cache Name", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The name of the cache" }, "defaultOperation": { "index": 1, "kind": "parameter", "displayName": "Default Operation", "group": "common", "label": "", "required": false, "type": "enum", "javaType": "org.apache.camel.component.hazelcast.HazelcastOperation", "enum": [ "put", "delete", "get", "update", "query", "getAll", "clear", "putIfAbsent", "addAll", "removeAll", "retainAll", "evict", "evictAll", "valueCount", "containsKey", "containsValue", "getKeys", "removeValue", "increment", "decrement", "setValue", "dest [...] diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/instance/HazelcastInstanceEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/instance/HazelcastInstanceEndpoint.java index 4235b14433c8..dbe4a01baf28 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/instance/HazelcastInstanceEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/instance/HazelcastInstanceEndpoint.java @@ -25,6 +25,9 @@ import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultComponent; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_INSTANCE; @@ -35,6 +38,11 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_INS @UriEndpoint(firstVersion = "2.7.0", scheme = SCHEME_INSTANCE, title = "Hazelcast Instance", syntax = "hazelcast-instance:cacheName", consumerOnly = true, category = { Category.CACHE, Category.CLUSTERING }, headersClass = HazelcastConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.NULL, + description = "No body: the CamelHazelcastListenerAction header says whether a " + + "member was added to or removed from the cluster, and " + + "CamelHazelcastInstanceHost and CamelHazelcastInstancePort give " + + "its address")) public class HazelcastInstanceEndpoint extends HazelcastDefaultEndpoint { public HazelcastInstanceEndpoint(HazelcastInstance hazelcastInstance, String uri, HazelcastDefaultComponent component) { diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/list/HazelcastListEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/list/HazelcastListEndpoint.java index 0e7f3280ff39..4a2e93cd5d6e 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/list/HazelcastListEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/list/HazelcastListEndpoint.java @@ -25,6 +25,9 @@ import org.apache.camel.Producer; import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_LIST; @@ -34,6 +37,33 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_LIS */ @UriEndpoint(firstVersion = "2.7.0", scheme = SCHEME_LIST, title = "Hazelcast List", syntax = "hazelcast-list:cacheName", category = { Category.CACHE, Category.CLUSTERING }, headersClass = HazelcastConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.POJO, javaType = "com.hazelcast.collection.ItemEvent", + description = "The Hazelcast ItemEvent of an item added to or removed from the " + + "list, not the item: ${body.item} is the item, and the " + + "CamelHazelcastListenerAction header is added or removed"), + producerIn = @BodyType(value = { + Carrier.TEXT, Carrier.BYTES, Carrier.FILE, Carrier.VALUE, Carrier.MAP, Carrier.LIST, Carrier.POJO }, + description = "The item that add and setValue store, at the index in the " + + "CamelHazelcastObjectIndex header when set, and that removeValue " + + "removes when the header is not set: an object Hazelcast can " + + "serialize, so a stream or no body fails. A Collection for " + + "addAll, removeAll and retainAll. The other operations do not use " + + "the body"), + producerOut = @BodyType(value = Carrier.UNKNOWN, byOption = { + @BodyType.When(option = "defaultOperation", value = "add", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "setValue", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "removeValue", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "clear", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "addAll", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "removeAll", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "retainAll", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "getAll", carriers = Carrier.LIST) }, + description = "By the operation, which the CamelHazelcastOperationType header " + + "sets, or else the defaultOperation option (without either the " + + "producer fails): the item at the index in the " + + "CamelHazelcastObjectIndex header for get, which needs the " + + "header, and the Hazelcast list itself for getAll: a live " + + "distributed List, not a copy. The other operations keep the body")) public class HazelcastListEndpoint extends HazelcastDefaultEndpoint { public HazelcastListEndpoint(HazelcastInstance hazelcastInstance, String endpointUri, Component component, diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapEndpoint.java index 926e09e18873..ab2f4abd3e56 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/map/HazelcastMapEndpoint.java @@ -25,6 +25,9 @@ import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultComponent; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_MAP; @@ -34,6 +37,42 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_MAP */ @UriEndpoint(firstVersion = "2.7.0", scheme = SCHEME_MAP, title = "Hazelcast Map", syntax = "hazelcast-map:cacheName", category = { Category.CACHE, Category.CLUSTERING }, headersClass = HazelcastConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.UNKNOWN, + description = "The value of the entry for an added or updated event, as any " + + "member of the cluster stored it, and no body for removed and " + + "evicted: the key is in the CamelHazelcastObjectId header and the " + + "event in CamelHazelcastListenerAction"), + producerIn = @BodyType(value = { + Carrier.TEXT, Carrier.BYTES, Carrier.FILE, Carrier.VALUE, Carrier.MAP, Carrier.LIST, Carrier.POJO }, + description = "The value that put, putIfAbsent and update store under the key " + + "in the CamelHazelcastObjectId header, and that containsValue " + + "looks for: an object Hazelcast can serialize, so a stream fails " + + "(convert it to bytes or text first), and no body fails. The " + + "other operations do not use the body"), + producerOut = @BodyType(value = Carrier.UNKNOWN, byOption = { + @BodyType.When(option = "defaultOperation", value = "put", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "putIfAbsent", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "update", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "delete", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "evict", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "evictAll", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "clear", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "containsKey", carriers = Carrier.VALUE, + javaType = "java.lang.Boolean"), + @BodyType.When(option = "defaultOperation", value = "containsValue", carriers = Carrier.VALUE, + javaType = "java.lang.Boolean"), + @BodyType.When(option = "defaultOperation", value = "getAll", carriers = Carrier.MAP), + @BodyType.When(option = "defaultOperation", value = "getKeys", carriers = Carrier.LIST), + @BodyType.When(option = "defaultOperation", value = "query", carriers = Carrier.LIST) }, + description = "By the operation, which the CamelHazelcastOperationType header " + + "sets, or else the defaultOperation option (without either the " + + "producer fails): the value of the key for get, or null when the " + + "key is not in the map, a Map of the keys in the Set of the " + + "CamelHazelcastObjectId header to their values for getAll, the " + + "keys for getKeys and the values that match the SQL predicate of " + + "the CamelHazelcastQuery header for query as a Collection, and a " + + "Boolean for containsKey and containsValue. The other operations " + + "keep the body")) public class HazelcastMapEndpoint extends HazelcastDefaultEndpoint { public HazelcastMapEndpoint(HazelcastInstance hazelcastInstance, String uri, String cacheName, diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/multimap/HazelcastMultimapEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/multimap/HazelcastMultimapEndpoint.java index 698bbc2edfb9..8751bd9d0375 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/multimap/HazelcastMultimapEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/multimap/HazelcastMultimapEndpoint.java @@ -25,6 +25,9 @@ import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultComponent; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_MULTIMAP; @@ -35,6 +38,36 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_MUL @UriEndpoint(firstVersion = "2.7.0", scheme = SCHEME_MULTIMAP, title = "Hazelcast Multimap", syntax = "hazelcast-multimap:cacheName", category = { Category.CACHE, Category.CLUSTERING }, headersClass = HazelcastConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.UNKNOWN, + description = "The value of an added event, as any member of the cluster stored " + + "it, and no body for removed: the key is in the " + + "CamelHazelcastObjectId header and the event in " + + "CamelHazelcastListenerAction"), + producerIn = @BodyType(value = { + Carrier.TEXT, Carrier.BYTES, Carrier.FILE, Carrier.VALUE, Carrier.MAP, Carrier.LIST, Carrier.POJO }, + description = "The value that put adds to the values of the key in the " + + "CamelHazelcastObjectId header, and that removeValue and " + + "containsValue look for: an object Hazelcast can serialize, so a " + + "stream fails (convert it to bytes or text first), and no body " + + "fails. The other operations do not use the body"), + producerOut = @BodyType(value = Carrier.UNKNOWN, byOption = { + @BodyType.When(option = "defaultOperation", value = "put", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "delete", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "removeValue", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "clear", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "get", carriers = Carrier.LIST), + @BodyType.When(option = "defaultOperation", value = "valueCount", carriers = Carrier.VALUE, + javaType = "java.lang.Integer"), + @BodyType.When(option = "defaultOperation", value = "containsKey", carriers = Carrier.VALUE, + javaType = "java.lang.Boolean"), + @BodyType.When(option = "defaultOperation", value = "containsValue", carriers = Carrier.VALUE, + javaType = "java.lang.Boolean") }, + description = "By the operation, which the CamelHazelcastOperationType header " + + "sets, or else the defaultOperation option (without either the " + + "producer fails): the Collection of the values of the key for " + + "get, empty when the key is not in the multimap, an Integer for " + + "valueCount and a Boolean for containsKey and containsValue. The " + + "other operations keep the body")) public class HazelcastMultimapEndpoint extends HazelcastDefaultEndpoint { public HazelcastMultimapEndpoint(HazelcastInstance hazelcastInstance, String uri, String cacheName, diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/pncounter/HazelcastPNCounterEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/pncounter/HazelcastPNCounterEndpoint.java index 8d6f8fec75de..7b39f81fd088 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/pncounter/HazelcastPNCounterEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/pncounter/HazelcastPNCounterEndpoint.java @@ -25,6 +25,9 @@ import org.apache.camel.Producer; import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_PNCOUNTER; @@ -36,6 +39,16 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_PNC syntax = "hazelcast-pncounter:cacheName", producerOnly = true, category = { Category.CACHE, Category.CLUSTERING }, headersClass = HazelcastConstants.class) +@BodyTypes(producerIn = @BodyType(value = Carrier.ANY, + description = "Not used, except by getAndAdd, which adds the body, a number or " + + "the text of one, to the counter: no body fails"), + producerOut = @BodyType(value = Carrier.VALUE, javaType = "java.lang.Long", byOption = { + @BodyType.When(option = "defaultOperation", value = "destroy", carriers = Carrier.UNCHANGED) }, + description = "The value of the counter as a Long: after the change for " + + "increment and decrement, before it for getAndAdd, and the " + + "current value for get; destroy keeps the body. The operation " + + "comes from the CamelHazelcastOperationType header, or else the " + + "defaultOperation option: without either the producer fails")) public class HazelcastPNCounterEndpoint extends HazelcastDefaultEndpoint { public HazelcastPNCounterEndpoint(HazelcastInstance hazelcastInstance, String uri, Component component, diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueEndpoint.java index 51794cd0c817..bc5431e2de90 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/queue/HazelcastQueueEndpoint.java @@ -28,6 +28,9 @@ import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; import org.apache.camel.component.hazelcast.HazelcastOperation; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -39,6 +42,35 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_QUE @UriEndpoint(firstVersion = "2.7.0", scheme = SCHEME_QUEUE, title = "Hazelcast Queue", syntax = "hazelcast-queue:cacheName", category = { Category.CACHE, Category.CLUSTERING, Category.MESSAGING }, headersClass = HazelcastConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.POJO, javaType = "com.hazelcast.collection.ItemEvent", byOption = { + @BodyType.When(option = "queueConsumerMode", value = "poll", carriers = Carrier.UNKNOWN) }, + description = "In Listen mode, the default, the Hazelcast ItemEvent of an item " + + "added to or removed from the queue, not the item: ${body.item} " + + "is the item, and the CamelHazelcastListenerAction header is " + + "added or removed. In Poll mode the consumer takes the items off " + + "the queue, and the body is the item itself, without headers"), + producerIn = @BodyType(value = { + Carrier.TEXT, Carrier.BYTES, Carrier.FILE, Carrier.VALUE, Carrier.MAP, Carrier.LIST, Carrier.POJO }, + description = "The item that add, the default, put and offer add to the queue, " + + "and that removeValue removes (without a body it removes the " + + "head): an object Hazelcast can serialize, so a stream or no body " + + "fails. A Collection for removeAll and retainAll. The other " + + "operations do not use the body"), + producerOut = @BodyType(value = Carrier.UNCHANGED, byOption = { + @BodyType.When(option = "defaultOperation", value = "poll", carriers = Carrier.UNKNOWN), + @BodyType.When(option = "defaultOperation", value = "peek", carriers = Carrier.UNKNOWN), + @BodyType.When(option = "defaultOperation", value = "take", carriers = Carrier.UNKNOWN), + @BodyType.When(option = "defaultOperation", value = "remainingCapacity", carriers = Carrier.VALUE, + javaType = "java.lang.Integer"), + @BodyType.When(option = "defaultOperation", value = "drainTo", carriers = Carrier.VALUE, + javaType = "java.lang.Integer") }, + description = "Unchanged for add, the default, and the other operations that " + + "change the queue. poll and peek give the head of the queue, or " + + "null when it is empty, and take waits for one; remainingCapacity " + + "gives an Integer, and drainTo the number of items it moved into " + + "the Collection of the CamelHazelcastDrainToCollection header. " + + "The CamelHazelcastOperationType header overrides the " + + "defaultOperation option")) public class HazelcastQueueEndpoint extends HazelcastDefaultEndpoint { @UriParam diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/replicatedmap/HazelcastReplicatedmapEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/replicatedmap/HazelcastReplicatedmapEndpoint.java index 12a4df59eaca..dc87a3c1374c 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/replicatedmap/HazelcastReplicatedmapEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/replicatedmap/HazelcastReplicatedmapEndpoint.java @@ -25,6 +25,9 @@ import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultComponent; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_REPLICATED_MAP; @@ -35,6 +38,31 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_REP @UriEndpoint(firstVersion = "2.16.0", scheme = SCHEME_REPLICATED_MAP, title = "Hazelcast Replicated Map", syntax = "hazelcast-replicatedmap:cacheName", category = { Category.CACHE, Category.CLUSTERING }, headersClass = HazelcastConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.UNKNOWN, + description = "The value of the entry for an added or updated event, as any " + + "member of the cluster stored it, and no body for removed: the " + + "key is in the CamelHazelcastObjectId header and the event in " + + "CamelHazelcastListenerAction"), + producerIn = @BodyType(value = { + Carrier.TEXT, Carrier.BYTES, Carrier.FILE, Carrier.VALUE, Carrier.MAP, Carrier.LIST, Carrier.POJO }, + description = "The value that put stores under the key in the " + + "CamelHazelcastObjectId header, and that containsValue looks for: " + + "an object Hazelcast can serialize, so a stream fails (convert it " + + "to bytes or text first), and no body fails. The other operations " + + "do not use the body"), + producerOut = @BodyType(value = Carrier.UNKNOWN, byOption = { + @BodyType.When(option = "defaultOperation", value = "put", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "delete", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "clear", carriers = Carrier.UNCHANGED), + @BodyType.When(option = "defaultOperation", value = "containsKey", carriers = Carrier.VALUE, + javaType = "java.lang.Boolean"), + @BodyType.When(option = "defaultOperation", value = "containsValue", carriers = Carrier.VALUE, + javaType = "java.lang.Boolean") }, + description = "By the operation, which the CamelHazelcastOperationType header " + + "sets, or else the defaultOperation option (without either the " + + "producer fails): the value of the key for get, or null when the " + + "key is not in the map, and a Boolean for containsKey and " + + "containsValue. The other operations keep the body")) public class HazelcastReplicatedmapEndpoint extends HazelcastDefaultEndpoint { public HazelcastReplicatedmapEndpoint(HazelcastInstance hazelcastInstance, String uri, String cacheName, diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/ringbuffer/HazelcastRingbufferEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/ringbuffer/HazelcastRingbufferEndpoint.java index 9920b55ead5c..4643b30d32ee 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/ringbuffer/HazelcastRingbufferEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/ringbuffer/HazelcastRingbufferEndpoint.java @@ -25,6 +25,9 @@ import org.apache.camel.Producer; import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_RING_BUFFER; @@ -35,6 +38,25 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_RIN @UriEndpoint(firstVersion = "2.16.0", scheme = SCHEME_RING_BUFFER, title = "Hazelcast Ringbuffer", syntax = "hazelcast-ringbuffer:cacheName", producerOnly = true, category = { Category.CACHE, Category.CLUSTERING }, headersClass = HazelcastConstants.class) +@BodyTypes(producerIn = @BodyType(value = { + Carrier.TEXT, Carrier.BYTES, Carrier.FILE, Carrier.VALUE, Carrier.MAP, Carrier.LIST, Carrier.POJO }, + description = "The item that add appends: an object Hazelcast can serialize, " + + "so a stream or no body fails. The other operations do not use " + + "the body"), + producerOut = @BodyType(value = Carrier.UNKNOWN, + byOption = { + @BodyType.When(option = "defaultOperation", value = "add", carriers = Carrier.VALUE, + javaType = "java.lang.Long"), + @BodyType.When(option = "defaultOperation", value = "capacity", + carriers = Carrier.VALUE, javaType = "java.lang.Long"), + @BodyType.When(option = "defaultOperation", value = "remainingCapacity", + carriers = Carrier.VALUE, javaType = "java.lang.Long") }, + description = "By the operation, which the CamelHazelcastOperationType header " + + "sets, or else the defaultOperation option (without either the " + + "producer fails): the sequence of the added item as a Long for " + + "add, a Long for capacity and remainingCapacity, and the item at " + + "the head (readOnceHead) or the tail (readOnceTail) of the " + + "ringbuffer")) public class HazelcastRingbufferEndpoint extends HazelcastDefaultEndpoint { public HazelcastRingbufferEndpoint(HazelcastInstance hazelcastInstance, String uri, Component component, diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaEndpoint.java index a85aac4a13fe..e1ab848af547 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/seda/HazelcastSedaEndpoint.java @@ -27,6 +27,9 @@ import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultComponent; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; import org.apache.camel.util.ObjectHelper; @@ -39,6 +42,21 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_SED */ @UriEndpoint(firstVersion = "2.7.0", scheme = SCHEME_SEDA, title = "Hazelcast SEDA", syntax = "hazelcast-seda:cacheName", category = { Category.CACHE, Category.CLUSTERING }, headersClass = HazelcastConstants.class) +@BodyTypes(consumerOut = @BodyType(value = { + Carrier.TEXT, Carrier.BYTES, Carrier.FILE, Carrier.VALUE, Carrier.MAP, Carrier.LIST, Carrier.POJO }, + description = "The body the producer put on the Hazelcast queue, as Hazelcast " + + "deserializes it: a body that is not Serializable, such as a " + + "stream, arrives as bytes. With transferExchange=true on the " + + "producer the headers and exchange properties come along"), + producerIn = @BodyType(value = { + Carrier.TEXT, Carrier.BYTES, Carrier.STREAM, Carrier.FILE, Carrier.VALUE, Carrier.MAP, Carrier.LIST, + Carrier.POJO }, + description = "A Serializable body goes on the queue as is, and another one " + + "converted to bytes, so a stream works, but a POJO that does not " + + "convert to bytes fails, as does no body"), + producerOut = @BodyType(value = Carrier.UNCHANGED, + description = "The producer puts the message on the queue and does not wait for " + + "the consumer, also for a message that expects a reply (InOut)")) public class HazelcastSedaEndpoint extends HazelcastDefaultEndpoint { private final BlockingQueue<Object> queue; diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/set/HazelcastSetEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/set/HazelcastSetEndpoint.java index d1247e2a0e71..c39e9a3fdb2f 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/set/HazelcastSetEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/set/HazelcastSetEndpoint.java @@ -25,6 +25,9 @@ import org.apache.camel.Producer; import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_SET; @@ -34,6 +37,23 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_SET */ @UriEndpoint(firstVersion = "2.7.0", scheme = SCHEME_SET, title = "Hazelcast Set", syntax = "hazelcast-set:cacheName", category = { Category.CACHE, Category.CLUSTERING }, headersClass = HazelcastConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.POJO, javaType = "com.hazelcast.collection.ItemEvent", + description = "The Hazelcast ItemEvent of an item added to or removed from the " + + "set, not the item: ${body.item} is the item, and the " + + "CamelHazelcastListenerAction header is added or removed"), + producerIn = @BodyType(value = { + Carrier.TEXT, Carrier.BYTES, Carrier.FILE, Carrier.VALUE, Carrier.MAP, Carrier.LIST, Carrier.POJO }, + description = "The item that add adds and removeValue removes: an object " + + "Hazelcast can serialize, so a stream or no body fails. A " + + "Collection for addAll, removeAll and retainAll. clear and getAll " + + "do not use the body"), + producerOut = @BodyType(value = Carrier.UNCHANGED, byOption = { + @BodyType.When(option = "defaultOperation", value = "getAll", carriers = Carrier.LIST) }, + description = "The operations that change the set keep the body. getAll gives " + + "the Hazelcast set itself: a live distributed Set, not a copy. " + + "The operation comes from the CamelHazelcastOperationType header, " + + "or else the defaultOperation option: without either the producer " + + "fails")) public class HazelcastSetEndpoint extends HazelcastDefaultEndpoint { public HazelcastSetEndpoint(HazelcastInstance hazelcastInstance, String endpointUri, Component component, diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/topic/HazelcastTopicEndpoint.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/topic/HazelcastTopicEndpoint.java index 5599b362d255..4f1f44d8c9a2 100644 --- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/topic/HazelcastTopicEndpoint.java +++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/topic/HazelcastTopicEndpoint.java @@ -27,6 +27,9 @@ import org.apache.camel.component.hazelcast.HazelcastCommand; import org.apache.camel.component.hazelcast.HazelcastConstants; import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint; import org.apache.camel.component.hazelcast.HazelcastOperation; +import org.apache.camel.spi.BodyType; +import org.apache.camel.spi.BodyType.Carrier; +import org.apache.camel.spi.BodyTypes; import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; @@ -38,6 +41,16 @@ import static org.apache.camel.component.hazelcast.HazelcastConstants.SCHEME_TOP @UriEndpoint(firstVersion = "2.15.0", scheme = SCHEME_TOPIC, title = "Hazelcast Topic", syntax = "hazelcast-topic:cacheName", category = { Category.CACHE, Category.CLUSTERING }, headersClass = HazelcastConstants.class) +@BodyTypes(consumerOut = @BodyType(value = Carrier.POJO, javaType = "com.hazelcast.topic.Message", + description = "The Hazelcast Message, not the published object: " + + "${body.messageObject} is the object and ${body.publishingMember} " + + "the member that published it. The CamelHazelcastListenerAction " + + "header is received"), + producerIn = @BodyType(value = { + Carrier.TEXT, Carrier.BYTES, Carrier.FILE, Carrier.VALUE, Carrier.MAP, Carrier.LIST, Carrier.POJO }, + description = "The object to publish: an object Hazelcast can serialize, so " + + "convert a stream to bytes or text first; no body fails"), + producerOut = @BodyType(value = Carrier.UNCHANGED, description = "The producer publishes the body and keeps it")) public class HazelcastTopicEndpoint extends HazelcastDefaultEndpoint implements MultipleConsumersSupport { @UriParam
