diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties index 70bcdb737b6..7681f3e0a98 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components.properties @@ -175,6 +175,7 @@ ignite-set imap imaps infinispan +infinispan-embedded influxdb iota ipfs diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/infinispan-embedded.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/infinispan-embedded.json new file mode 100644 index 00000000000..fb83bd43e66 --- /dev/null +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/infinispan-embedded.json @@ -0,0 +1,69 @@ +{ + "component": { + "kind": "component", + "name": "infinispan-embedded", + "title": "Infinispan Embedded", + "description": "Read and write from\/to Infinispan distributed key\/value store and data grid.", + "deprecated": false, + "firstVersion": "2.13.0", + "label": "cache,datagrid,clustering", + "javaType": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedComponent", + "supportLevel": "Stable", + "groupId": "org.apache.camel.springboot", + "artifactId": "camel-infinispan-embedded-starter", + "version": "3.8.0-SNAPSHOT", + "scheme": "infinispan-embedded", + "extendsScheme": "", + "syntax": "infinispan-embedded:cacheName", + "async": false, + "api": false, + "consumerOnly": false, + "producerOnly": false, + "lenientProperties": false + }, + "componentProperties": { + "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" }, + "queryBuilder": { "kind": "property", "displayName": "Query Builder", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Specifies the query builder." }, + "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, + "clusteredListener": { "kind": "property", "displayName": "Clustered Listener", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "If true, the listener will be installed for the entire cluster" }, + "customListener": { "kind": "property", "displayName": "Custom Listener", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedCustomListener", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Returns the custom listener in use, if provided" }, + "eventTypes": { "kind": "property", "displayName": "Event Types", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Specifies the set of event types to register by the consumer.Multiple event can be separated by comma. The possible event types are: CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, CACHE_ENTRY_EXPIRED, DATA_REHASHED, TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED, PERSISTENCE_AVAILABILITY_CHANGED" }, + "sync": { "kind": "property", "displayName": "Sync", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "If true, the consumer will receive notifications synchronously" }, + "defaultValue": { "kind": "property", "displayName": "Default Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific default value for some producer operations" }, + "key": { "kind": "property", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations" }, + "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }, + "oldValue": { "kind": "property", "displayName": "Old Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific old value for some producer operations" }, + "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanOperation", "enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", "PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", "REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", "CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "The operation to perform" }, + "value": { "kind": "property", "displayName": "Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific value for producer operations" }, + "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }, + "cacheContainer": { "kind": "property", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.manager.EmbeddedCacheManager", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" }, + "cacheContainerConfiguration": { "kind": "property", "displayName": "Cache Container Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.configuration.cache.Configuration", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "The CacheContainer configuration. Used if the cacheContainer is not defined." }, + "configurationUri": { "kind": "property", "displayName": "Configuration Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "An implementation specific URI for the CacheManager" }, + "flags": { "kind": "property", "displayName": "Flags", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "A comma separated list of org.infinispan.context.Flag to be applied by default on each cache invocation" }, + "remappingFunction": { "kind": "property", "displayName": "Remapping Function", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.function.BiFunction", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific remappingFunction to use in a compute operation." }, + "resultHeader": { "kind": "property", "displayName": "Result Header", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader" } + }, + "properties": { + "cacheName": { "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 to use. Use current to use the existing cache name from the currently configured cached manager. Or use default for the default cache manager name." }, + "queryBuilder": { "kind": "parameter", "displayName": "Query Builder", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Specifies the query builder." }, + "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, + "clusteredListener": { "kind": "parameter", "displayName": "Clustered Listener", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "If true, the listener will be installed for the entire cluster" }, + "customListener": { "kind": "parameter", "displayName": "Custom Listener", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedCustomListener", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Returns the custom listener in use, if provided" }, + "eventTypes": { "kind": "parameter", "displayName": "Event Types", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Specifies the set of event types to register by the consumer.Multiple event can be separated by comma. The possible event types are: CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, CACHE_ENTRY_EXPIRED, DATA_REHASHED, TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED, PERSISTENCE_AVAILABILITY_CHANGED" }, + "sync": { "kind": "parameter", "displayName": "Sync", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "If true, the consumer will receive notifications synchronously" }, + "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, + "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, + "defaultValue": { "kind": "parameter", "displayName": "Default Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific default value for some producer operations" }, + "key": { "kind": "parameter", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations" }, + "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }, + "oldValue": { "kind": "parameter", "displayName": "Old Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific old value for some producer operations" }, + "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanOperation", "enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", "PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", "REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", "CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "The operation to perform" }, + "value": { "kind": "parameter", "displayName": "Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific value for producer operations" }, + "cacheContainer": { "kind": "parameter", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.manager.EmbeddedCacheManager", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" }, + "cacheContainerConfiguration": { "kind": "parameter", "displayName": "Cache Container Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.configuration.cache.Configuration", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "The CacheContainer configuration. Used if the cacheContainer is not defined." }, + "configurationUri": { "kind": "parameter", "displayName": "Configuration Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "An implementation specific URI for the CacheManager" }, + "flags": { "kind": "parameter", "displayName": "Flags", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "A comma separated list of org.infinispan.context.Flag to be applied by default on each cache invocation" }, + "remappingFunction": { "kind": "parameter", "displayName": "Remapping Function", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.function.BiFunction", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Set a specific remappingFunction to use in a compute operation." }, + "resultHeader": { "kind": "parameter", "displayName": "Result Header", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration", "configurationField": "configuration", "description": "Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader" } + } +} diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/infinispan.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/infinispan.json index e3ebac0911a..87c02d15d9f 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/infinispan.json +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/infinispan.json @@ -7,7 +7,7 @@ "deprecated": false, "firstVersion": "2.13.0", "label": "cache,datagrid,clustering", - "javaType": "org.apache.camel.component.infinispan.InfinispanComponent", + "javaType": "org.apache.camel.component.infinispan.remote.InfinispanRemoteComponent", "supportLevel": "Stable", "groupId": "org.apache.camel.springboot", "artifactId": "camel-infinispan-starter", @@ -22,66 +22,60 @@ "lenientProperties": false }, "componentProperties": { - "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" }, - "hosts": { "kind": "property", "displayName": "Hosts", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the host of the cache on Infinispan instance" }, - "queryBuilder": { "kind": "property", "displayName": "Query Builder", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the query builder." }, - "secure": { "kind": "property", "displayName": "Secure", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define if we are connecting to a secured Infinispan instance" }, + "configuration": { "kind": "property", "displayName": "Configuration", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "deprecated": false, "autowired": false, "secret": false, "description": "Component configuration" }, + "hosts": { "kind": "property", "displayName": "Hosts", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Specifies the host of the cache on Infinispan instance" }, + "queryBuilder": { "kind": "property", "displayName": "Query Builder", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Specifies the query builder." }, + "secure": { "kind": "property", "displayName": "Secure", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define if we are connecting to a secured Infinispan instance" }, "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, - "clusteredListener": { "kind": "property", "displayName": "Clustered Listener", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "If true, the listener will be installed for the entire cluster" }, - "command": { "kind": "property", "displayName": "Command", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "The operation to perform." }, - "customListener": { "kind": "property", "displayName": "Custom Listener", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanCustomListener", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Returns the custom listener in use, if provided" }, - "eventTypes": { "kind": "property", "displayName": "Event Types", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the set of event types to register by the consumer. Multiple event can be separated by comma. The possible event types are: CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, DATA_REHASHED, TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED" }, - "sync": { "kind": "property", "displayName": "Sync", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "If true, the consumer will receive notifications synchronously" }, - "defaultValue": { "kind": "property", "displayName": "Default Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Set a specific default value for some producer operations" }, - "key": { "kind": "property", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations" }, + "customListener": { "kind": "property", "displayName": "Custom Listener", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.remote.InfinispanRemoteCustomListener", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Returns the custom listener in use, if provided" }, + "eventTypes": { "kind": "property", "displayName": "Event Types", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Specifies the set of event types to register by the consumer.Multiple event can be separated by comma. The possible event types are: CLIENT_CACHE_ENTRY_CREATED, CLIENT_CACHE_ENTRY_MODIFIED, CLIENT_CACHE_ENTRY_REMOVED, CLIENT_CACHE_ENTRY_EXPIRED, CLIENT_CACHE_FAILOVER" }, + "defaultValue": { "kind": "property", "displayName": "Default Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific default value for some producer operations" }, + "key": { "kind": "property", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations" }, "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }, - "oldValue": { "kind": "property", "displayName": "Old Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Set a specific old value for some producer operations" }, - "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanOperation", "enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", "PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", "REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", "CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "The operation to perform." }, - "value": { "kind": "property", "displayName": "Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Set a specific value for producer operations" }, - "password": { "kind": "property", "displayName": "Password", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the password to access the infinispan instance" }, - "saslMechanism": { "kind": "property", "displayName": "Sasl Mechanism", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the SASL Mechanism to access the infinispan instance" }, - "securityRealm": { "kind": "property", "displayName": "Security Realm", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the security realm to access the infinispan instance" }, - "securityServerName": { "kind": "property", "displayName": "Security Server Name", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the security server name to access the infinispan instance" }, - "username": { "kind": "property", "displayName": "Username", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the username to access the infinispan instance" }, + "oldValue": { "kind": "property", "displayName": "Old Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific old value for some producer operations" }, + "operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanOperation", "enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", "PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", "REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", "CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "The operation to perform" }, + "value": { "kind": "property", "displayName": "Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific value for producer operations" }, + "password": { "kind": "property", "displayName": "Password", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define the password to access the infinispan instance" }, + "saslMechanism": { "kind": "property", "displayName": "Sasl Mechanism", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define the SASL Mechanism to access the infinispan instance" }, + "securityRealm": { "kind": "property", "displayName": "Security Realm", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define the security realm to access the infinispan instance" }, + "securityServerName": { "kind": "property", "displayName": "Security Server Name", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define the security server name to access the infinispan instance" }, + "username": { "kind": "property", "displayName": "Username", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define the username to access the infinispan instance" }, "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }, - "cacheContainer": { "kind": "property", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" }, - "cacheContainerConfiguration": { "kind": "property", "displayName": "Cache Container Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "The CacheContainer configuration. Uses if the cacheContainer is not defined. Must be the following types: org.infinispan.client.hotrod.configuration.Configuration - for remote cache interaction configuration; org.infinispan.configuration.cache.Configuration - for embedded cache interaction configuration;" }, - "configurationProperties": { "kind": "property", "displayName": "Configuration Properties", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Implementation specific properties for the CacheManager" }, - "configurationUri": { "kind": "property", "displayName": "Configuration Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "An implementation specific URI for the CacheManager" }, - "flags": { "kind": "property", "displayName": "Flags", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "A comma separated list of Flag to be applied by default on each cache invocation, not applicable to remote caches." }, - "remappingFunction": { "kind": "property", "displayName": "Remapping Function", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.function.BiFunction", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Set a specific remappingFunction to use in a compute operation" }, - "resultHeader": { "kind": "property", "displayName": "Result Header", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader" } + "cacheContainer": { "kind": "property", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.client.hotrod.RemoteCacheManager", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" }, + "cacheContainerConfiguration": { "kind": "property", "displayName": "Cache Container Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.client.hotrod.configuration.Configuration", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "The CacheContainer configuration. Used if the cacheContainer is not defined." }, + "configurationProperties": { "kind": "property", "displayName": "Configuration Properties", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Implementation specific properties for the CacheManager" }, + "configurationUri": { "kind": "property", "displayName": "Configuration Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "An implementation specific URI for the CacheManager" }, + "flags": { "kind": "property", "displayName": "Flags", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "A comma separated list of org.infinispan.client.hotrod.Flag to be applied by default on each cache invocation." }, + "remappingFunction": { "kind": "property", "displayName": "Remapping Function", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.function.BiFunction", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific remappingFunction to use in a compute operation." }, + "resultHeader": { "kind": "property", "displayName": "Result Header", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader" } }, "properties": { "cacheName": { "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 to use. Use current to use the existing cache name from the currently configured cached manager. Or use default for the default cache manager name." }, - "hosts": { "kind": "parameter", "displayName": "Hosts", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the host of the cache on Infinispan instance" }, - "queryBuilder": { "kind": "parameter", "displayName": "Query Builder", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the query builder." }, - "secure": { "kind": "parameter", "displayName": "Secure", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define if we are connecting to a secured Infinispan instance" }, + "hosts": { "kind": "parameter", "displayName": "Hosts", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Specifies the host of the cache on Infinispan instance" }, + "queryBuilder": { "kind": "parameter", "displayName": "Query Builder", "group": "common", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanQueryBuilder", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Specifies the query builder." }, + "secure": { "kind": "parameter", "displayName": "Secure", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define if we are connecting to a secured Infinispan instance" }, "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, - "clusteredListener": { "kind": "parameter", "displayName": "Clustered Listener", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "If true, the listener will be installed for the entire cluster" }, - "command": { "kind": "parameter", "displayName": "Command", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": true, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "The operation to perform." }, - "customListener": { "kind": "parameter", "displayName": "Custom Listener", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanCustomListener", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Returns the custom listener in use, if provided" }, - "eventTypes": { "kind": "parameter", "displayName": "Event Types", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the set of event types to register by the consumer. Multiple event can be separated by comma. The possible event types are: CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, DATA_REHASHED, TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED" }, - "sync": { "kind": "parameter", "displayName": "Sync", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "If true, the consumer will receive notifications synchronously" }, + "customListener": { "kind": "parameter", "displayName": "Custom Listener", "group": "consumer", "label": "consumer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.remote.InfinispanRemoteCustomListener", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Returns the custom listener in use, if provided" }, + "eventTypes": { "kind": "parameter", "displayName": "Event Types", "group": "consumer", "label": "consumer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Specifies the set of event types to register by the consumer.Multiple event can be separated by comma. The possible event types are: CLIENT_CACHE_ENTRY_CREATED, CLIENT_CACHE_ENTRY_MODIFIED, CLIENT_CACHE_ENTRY_REMOVED, CLIENT_CACHE_ENTRY_EXPIRED, CLIENT_CACHE_FAILOVER" }, "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored." }, "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, - "defaultValue": { "kind": "parameter", "displayName": "Default Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Set a specific default value for some producer operations" }, - "key": { "kind": "parameter", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations" }, + "defaultValue": { "kind": "parameter", "displayName": "Default Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific default value for some producer operations" }, + "key": { "kind": "parameter", "displayName": "Key", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific key for producer operations" }, "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing." }, - "oldValue": { "kind": "parameter", "displayName": "Old Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Set a specific old value for some producer operations" }, - "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanOperation", "enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", "PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", "REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", "CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "The operation to perform." }, - "value": { "kind": "parameter", "displayName": "Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Set a specific value for producer operations" }, - "password": { "kind": "parameter", "displayName": "Password", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the password to access the infinispan instance" }, - "saslMechanism": { "kind": "parameter", "displayName": "Sasl Mechanism", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the SASL Mechanism to access the infinispan instance" }, - "securityRealm": { "kind": "parameter", "displayName": "Security Realm", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the security realm to access the infinispan instance" }, - "securityServerName": { "kind": "parameter", "displayName": "Security Server Name", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the security server name to access the infinispan instance" }, - "username": { "kind": "parameter", "displayName": "Username", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Define the username to access the infinispan instance" }, - "cacheContainer": { "kind": "parameter", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.commons.api.BasicCacheContainer", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" }, - "cacheContainerConfiguration": { "kind": "parameter", "displayName": "Cache Container Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "The CacheContainer configuration. Uses if the cacheContainer is not defined. Must be the following types: org.infinispan.client.hotrod.configuration.Configuration - for remote cache interaction configuration; org.infinispan.configuration.cache.Configuration - for embedded cache interaction configuration;" }, - "configurationProperties": { "kind": "parameter", "displayName": "Configuration Properties", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Implementation specific properties for the CacheManager" }, - "configurationUri": { "kind": "parameter", "displayName": "Configuration Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "An implementation specific URI for the CacheManager" }, - "flags": { "kind": "parameter", "displayName": "Flags", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "A comma separated list of Flag to be applied by default on each cache invocation, not applicable to remote caches." }, - "remappingFunction": { "kind": "parameter", "displayName": "Remapping Function", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.function.BiFunction", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Set a specific remappingFunction to use in a compute operation" }, - "resultHeader": { "kind": "parameter", "displayName": "Result Header", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.InfinispanConfiguration", "configurationField": "configuration", "description": "Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader" } + "oldValue": { "kind": "parameter", "displayName": "Old Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific old value for some producer operations" }, + "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.infinispan.InfinispanOperation", "enum": [ "PUT", "PUTASYNC", "PUTALL", "PUTALLASYNC", "PUTIFABSENT", "PUTIFABSENTASYNC", "GET", "GETORDEFAULT", "CONTAINSKEY", "CONTAINSVALUE", "REMOVE", "REMOVEASYNC", "REPLACE", "REPLACEASYNC", "SIZE", "CLEAR", "CLEARASYNC", "QUERY", "STATS", "COMPUTE", "COMPUTEASYNC" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "PUT", "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "The operation to perform" }, + "value": { "kind": "parameter", "displayName": "Value", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "java.lang.Object", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific value for producer operations" }, + "password": { "kind": "parameter", "displayName": "Password", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define the password to access the infinispan instance" }, + "saslMechanism": { "kind": "parameter", "displayName": "Sasl Mechanism", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define the SASL Mechanism to access the infinispan instance" }, + "securityRealm": { "kind": "parameter", "displayName": "Security Realm", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define the security realm to access the infinispan instance" }, + "securityServerName": { "kind": "parameter", "displayName": "Security Server Name", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define the security server name to access the infinispan instance" }, + "username": { "kind": "parameter", "displayName": "Username", "group": " security", "label": "common, security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Define the username to access the infinispan instance" }, + "cacheContainer": { "kind": "parameter", "displayName": "Cache Container", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.client.hotrod.RemoteCacheManager", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Specifies the cache Container to connect" }, + "cacheContainerConfiguration": { "kind": "parameter", "displayName": "Cache Container Configuration", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "org.infinispan.client.hotrod.configuration.Configuration", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "The CacheContainer configuration. Used if the cacheContainer is not defined." }, + "configurationProperties": { "kind": "parameter", "displayName": "Configuration Properties", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.Map", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Implementation specific properties for the CacheManager" }, + "configurationUri": { "kind": "parameter", "displayName": "Configuration Uri", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "An implementation specific URI for the CacheManager" }, + "flags": { "kind": "parameter", "displayName": "Flags", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "A comma separated list of org.infinispan.client.hotrod.Flag to be applied by default on each cache invocation." }, + "remappingFunction": { "kind": "parameter", "displayName": "Remapping Function", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "java.util.function.BiFunction", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Set a specific remappingFunction to use in a compute operation." }, + "resultHeader": { "kind": "parameter", "displayName": "Result Header", "group": "advanced", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration", "configurationField": "configuration", "description": "Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader" } } } diff --git a/components-starter/README.adoc b/components-starter/README.adoc index 9d0fb6ce173..dbbdcf971a9 100644 --- a/components-starter/README.adoc +++ b/components-starter/README.adoc @@ -5,7 +5,7 @@ Apache Camel Spring Boot supports the following Camel artifacts as Spring Boot S == Camel Components // components: START -Number of Camel components: 343 in 276 JAR artifacts (3 deprecated) +Number of Camel components: 344 in 277 JAR artifacts (3 deprecated) [width="100%",cols="4,3,3,3,6",options="header"] |=== @@ -347,6 +347,8 @@ Number of Camel components: 343 in 276 JAR artifacts (3 deprecated) | xref:latest@components::infinispan-component.adoc[Infinispan] | camel-infinispan-starter | Stable | 2.13 | Read and write from/to Infinispan distributed key/value store and data grid. +| xref:latest@components::infinispan-embedded-component.adoc[Infinispan Embedded] | camel-infinispan-embedded-starter | Stable | 2.13 | Read and write from/to Infinispan distributed key/value store and data grid. + | xref:latest@components::influxdb-component.adoc[InfluxDB] | camel-influxdb-starter | Stable | 2.18 | Interact with InfluxDB, a time series database. | xref:latest@components::iota-component.adoc[IOTA] | camel-iota-starter | Stable | 2.23 | Manage financial transactions using IOTA distributed ledger. diff --git a/components-starter/camel-infinispan-embedded-starter/pom.xml b/components-starter/camel-infinispan-embedded-starter/pom.xml new file mode 100644 index 00000000000..fa054e20880 --- /dev/null +++ b/components-starter/camel-infinispan-embedded-starter/pom.xml @@ -0,0 +1,53 @@ + + + + 4.0.0 + + org.apache.camel.springboot + components-starter + 3.8.0-SNAPSHOT + + camel-infinispan-embedded-starter + jar + + + + + org.springframework.boot + spring-boot-starter + ${spring-boot-version} + + + org.apache.camel + camel-infinispan-embedded + ${camel-version} + + + + org.apache.camel.springboot + camel-core-starter + + + org.apache.camel.springboot + camel-spring-boot-starter + + + + diff --git a/components-starter/camel-infinispan-embedded-starter/src/main/docs/infinispan-embedded-starter.adoc b/components-starter/camel-infinispan-embedded-starter/src/main/docs/infinispan-embedded-starter.adoc new file mode 100644 index 00000000000..9db39d79801 --- /dev/null +++ b/components-starter/camel-infinispan-embedded-starter/src/main/docs/infinispan-embedded-starter.adoc @@ -0,0 +1,51 @@ +// spring-boot-auto-configure options: START +:page-partial: +:doctitle: Camel Spring Boot Starter for infinispan-embedded + +== Spring Boot Auto-Configuration + +When using infinispan-embedded with Spring Boot make sure to use the following Maven dependency to have support for auto configuration: + +[source,xml] +---- + + org.apache.camel.springboot + camel-infinispan-embedded-starter + x.x.x + + +---- + + +The component supports 21 options, which are listed below. + + + +[width="100%",cols="2,5,^1,2",options="header"] +|=== +| Name | Description | Default | Type +| *camel.component.infinispan-embedded.autowired-enabled* | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean +| *camel.component.infinispan-embedded.bridge-error-handler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean +| *camel.component.infinispan-embedded.cache-container* | Specifies the cache Container to connect. The option is a org.infinispan.manager.EmbeddedCacheManager type. | | EmbeddedCacheManager +| *camel.component.infinispan-embedded.cache-container-configuration* | The CacheContainer configuration. Used if the cacheContainer is not defined. The option is a org.infinispan.configuration.cache.Configuration type. | | Configuration +| *camel.component.infinispan-embedded.clustered-listener* | If true, the listener will be installed for the entire cluster | false | Boolean +| *camel.component.infinispan-embedded.configuration* | Component configuration. The option is a org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration type. | | InfinispanEmbeddedConfiguration +| *camel.component.infinispan-embedded.configuration-uri* | An implementation specific URI for the CacheManager | | String +| *camel.component.infinispan-embedded.custom-listener* | Returns the custom listener in use, if provided. The option is a org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedCustomListener type. | | InfinispanEmbeddedCustomListener +| *camel.component.infinispan-embedded.default-value* | Set a specific default value for some producer operations. The option is a java.lang.Object type. | | Object +| *camel.component.infinispan-embedded.enabled* | Whether to enable auto configuration of the infinispan-embedded component. This is enabled by default. | | Boolean +| *camel.component.infinispan-embedded.event-types* | Specifies the set of event types to register by the consumer.Multiple event can be separated by comma. The possible event types are: CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, CACHE_ENTRY_EXPIRED, DATA_REHASHED, TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED, PERSISTENCE_AVAILABILITY_CHANGED | | String +| *camel.component.infinispan-embedded.flags* | A comma separated list of org.infinispan.context.Flag to be applied by default on each cache invocation | | String +| *camel.component.infinispan-embedded.key* | Set a specific key for producer operations. The option is a java.lang.Object type. | | Object +| *camel.component.infinispan-embedded.lazy-start-producer* | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean +| *camel.component.infinispan-embedded.old-value* | Set a specific old value for some producer operations. The option is a java.lang.Object type. | | Object +| *camel.component.infinispan-embedded.operation* | The operation to perform | | InfinispanOperation +| *camel.component.infinispan-embedded.query-builder* | Specifies the query builder. The option is a org.apache.camel.component.infinispan.InfinispanQueryBuilder type. | | InfinispanQueryBuilder +| *camel.component.infinispan-embedded.remapping-function* | Set a specific remappingFunction to use in a compute operation. The option is a java.util.function.BiFunction type. | | BiFunction +| *camel.component.infinispan-embedded.result-header* | Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader | | String +| *camel.component.infinispan-embedded.sync* | If true, the consumer will receive notifications synchronously | true | Boolean +| *camel.component.infinispan-embedded.value* | Set a specific value for producer operations. The option is a java.lang.Object type. | | Object +|=== + + +// spring-boot-auto-configure options: END diff --git a/components-starter/camel-infinispan-embedded-starter/src/main/java/org/apache/camel/component/infinispan/embedded/springboot/InfinispanEmbeddedComponentAutoConfiguration.java b/components-starter/camel-infinispan-embedded-starter/src/main/java/org/apache/camel/component/infinispan/embedded/springboot/InfinispanEmbeddedComponentAutoConfiguration.java new file mode 100644 index 00000000000..c90d5690989 --- /dev/null +++ b/components-starter/camel-infinispan-embedded-starter/src/main/java/org/apache/camel/component/infinispan/embedded/springboot/InfinispanEmbeddedComponentAutoConfiguration.java @@ -0,0 +1,82 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.infinispan.embedded.springboot; + +import javax.annotation.Generated; +import org.apache.camel.CamelContext; +import org.apache.camel.Component; +import org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedComponent; +import org.apache.camel.spi.ComponentCustomizer; +import org.apache.camel.spring.boot.CamelAutoConfiguration; +import org.apache.camel.spring.boot.ComponentConfigurationProperties; +import org.apache.camel.spring.boot.util.CamelPropertiesHelper; +import org.apache.camel.spring.boot.util.ConditionalOnCamelContextAndAutoConfigurationBeans; +import org.apache.camel.spring.boot.util.ConditionalOnHierarchicalProperties; +import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.AutoConfigureAfter; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.boot.convert.ApplicationConversionService; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Conditional; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo") +@Configuration(proxyBeanMethods = false) +@AutoConfigureAfter(CamelAutoConfiguration.class) +@Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class) +@EnableConfigurationProperties({ComponentConfigurationProperties.class,InfinispanEmbeddedComponentConfiguration.class}) +@ConditionalOnHierarchicalProperties({"camel.component", "camel.component.infinispan-embedded"}) +public class InfinispanEmbeddedComponentAutoConfiguration { + + @Autowired + private ApplicationContext applicationContext; + private final CamelContext camelContext; + @Autowired + private InfinispanEmbeddedComponentConfiguration configuration; + + public InfinispanEmbeddedComponentAutoConfiguration( + org.apache.camel.CamelContext camelContext) { + this.camelContext = camelContext; + ApplicationConversionService acs = (ApplicationConversionService) ApplicationConversionService.getSharedInstance(); + acs.addConverter(new InfinispanEmbeddedComponentConverter(camelContext)); + } + + @Lazy + @Bean + public ComponentCustomizer configureInfinispanEmbeddedComponent() { + return new ComponentCustomizer() { + @Override + public void configure(String name, Component target) { + CamelPropertiesHelper.copyProperties(camelContext, configuration, target); + } + @Override + public boolean isEnabled(String name, Component target) { + return HierarchicalPropertiesEvaluator.evaluate( + applicationContext, + "camel.component.customizer", + "camel.component.infinispan-embedded.customizer") + && target instanceof InfinispanEmbeddedComponent; + } + }; + } +} \ No newline at end of file diff --git a/components-starter/camel-infinispan-embedded-starter/src/main/java/org/apache/camel/component/infinispan/embedded/springboot/InfinispanEmbeddedComponentConfiguration.java b/components-starter/camel-infinispan-embedded-starter/src/main/java/org/apache/camel/component/infinispan/embedded/springboot/InfinispanEmbeddedComponentConfiguration.java new file mode 100644 index 00000000000..72430859bfa --- /dev/null +++ b/components-starter/camel-infinispan-embedded-starter/src/main/java/org/apache/camel/component/infinispan/embedded/springboot/InfinispanEmbeddedComponentConfiguration.java @@ -0,0 +1,331 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.infinispan.embedded.springboot; + +import java.util.function.BiFunction; +import javax.annotation.Generated; +import org.apache.camel.component.infinispan.InfinispanOperation; +import org.apache.camel.component.infinispan.InfinispanQueryBuilder; +import org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedComponent; +import org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration; +import org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedCustomListener; +import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon; +import org.infinispan.configuration.cache.Configuration; +import org.infinispan.manager.EmbeddedCacheManager; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * Read and write from/to Infinispan distributed key/value store and data grid. + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo") +@ConfigurationProperties(prefix = "camel.component.infinispan-embedded") +public class InfinispanEmbeddedComponentConfiguration + extends + ComponentConfigurationPropertiesCommon { + + /** + * Whether to enable auto configuration of the infinispan-embedded + * component. This is enabled by default. + */ + private Boolean enabled; + /** + * Component configuration. The option is a + * org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration type. + */ + private InfinispanEmbeddedConfiguration configuration; + /** + * Specifies the query builder. The option is a + * org.apache.camel.component.infinispan.InfinispanQueryBuilder type. + */ + private InfinispanQueryBuilder queryBuilder; + /** + * Allows for bridging the consumer to the Camel routing Error Handler, + * which mean any exceptions occurred while the consumer is trying to pickup + * incoming messages, or the likes, will now be processed as a message and + * handled by the routing Error Handler. By default the consumer will use + * the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that + * will be logged at WARN or ERROR level and ignored. + */ + private Boolean bridgeErrorHandler = false; + /** + * If true, the listener will be installed for the entire cluster + */ + private Boolean clusteredListener = false; + /** + * Returns the custom listener in use, if provided. The option is a + * org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedCustomListener type. + */ + private InfinispanEmbeddedCustomListener customListener; + /** + * Specifies the set of event types to register by the consumer.Multiple + * event can be separated by comma. The possible event types are: + * CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, + * CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, + * CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, + * TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, CACHE_ENTRY_EXPIRED, + * DATA_REHASHED, TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED, + * PERSISTENCE_AVAILABILITY_CHANGED + */ + private String eventTypes; + /** + * If true, the consumer will receive notifications synchronously + */ + private Boolean sync = true; + /** + * Set a specific default value for some producer operations. The option is + * a java.lang.Object type. + */ + private Object defaultValue; + /** + * Set a specific key for producer operations. The option is a + * java.lang.Object type. + */ + private Object key; + /** + * Whether the producer should be started lazy (on the first message). By + * starting lazy you can use this to allow CamelContext and routes to + * startup in situations where a producer may otherwise fail during starting + * and cause the route to fail being started. By deferring this startup to + * be lazy then the startup failure can be handled during routing messages + * via Camel's routing error handlers. Beware that when the first message is + * processed then creating and starting the producer may take a little time + * and prolong the total processing time of the processing. + */ + private Boolean lazyStartProducer = false; + /** + * Set a specific old value for some producer operations. The option is a + * java.lang.Object type. + */ + private Object oldValue; + /** + * The operation to perform + */ + private InfinispanOperation operation = InfinispanOperation.PUT; + /** + * Set a specific value for producer operations. The option is a + * java.lang.Object type. + */ + private Object value; + /** + * Whether autowiring is enabled. This is used for automatic autowiring + * options (the option must be marked as autowired) by looking up in the + * registry to find if there is a single instance of matching type, which + * then gets configured on the component. This can be used for automatic + * configuring JDBC data sources, JMS connection factories, AWS Clients, + * etc. + */ + private Boolean autowiredEnabled = true; + /** + * Specifies the cache Container to connect. The option is a + * org.infinispan.manager.EmbeddedCacheManager type. + */ + private EmbeddedCacheManager cacheContainer; + /** + * The CacheContainer configuration. Used if the cacheContainer is not + * defined. The option is a org.infinispan.configuration.cache.Configuration + * type. + */ + private Configuration cacheContainerConfiguration; + /** + * An implementation specific URI for the CacheManager + */ + private String configurationUri; + /** + * A comma separated list of org.infinispan.context.Flag to be applied by + * default on each cache invocation + */ + private String flags; + /** + * Set a specific remappingFunction to use in a compute operation. The + * option is a java.util.function.BiFunction type. + */ + private BiFunction remappingFunction; + /** + * Store the operation result in a header instead of the message body. By + * default, resultHeader == null and the query result is stored in the + * message body, any existing content in the message body is discarded. If + * resultHeader is set, the value is used as the name of the header to store + * the query result and the original message body is preserved. This value + * can be overridden by an in message header named: + * CamelInfinispanOperationResultHeader + */ + private String resultHeader; + + public InfinispanEmbeddedConfiguration getConfiguration() { + return configuration; + } + + public void setConfiguration(InfinispanEmbeddedConfiguration configuration) { + this.configuration = configuration; + } + + public InfinispanQueryBuilder getQueryBuilder() { + return queryBuilder; + } + + public void setQueryBuilder(InfinispanQueryBuilder queryBuilder) { + this.queryBuilder = queryBuilder; + } + + public Boolean getBridgeErrorHandler() { + return bridgeErrorHandler; + } + + public void setBridgeErrorHandler(Boolean bridgeErrorHandler) { + this.bridgeErrorHandler = bridgeErrorHandler; + } + + public Boolean getClusteredListener() { + return clusteredListener; + } + + public void setClusteredListener(Boolean clusteredListener) { + this.clusteredListener = clusteredListener; + } + + public InfinispanEmbeddedCustomListener getCustomListener() { + return customListener; + } + + public void setCustomListener( + InfinispanEmbeddedCustomListener customListener) { + this.customListener = customListener; + } + + public String getEventTypes() { + return eventTypes; + } + + public void setEventTypes(String eventTypes) { + this.eventTypes = eventTypes; + } + + public Boolean getSync() { + return sync; + } + + public void setSync(Boolean sync) { + this.sync = sync; + } + + public Object getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(Object defaultValue) { + this.defaultValue = defaultValue; + } + + public Object getKey() { + return key; + } + + public void setKey(Object key) { + this.key = key; + } + + public Boolean getLazyStartProducer() { + return lazyStartProducer; + } + + public void setLazyStartProducer(Boolean lazyStartProducer) { + this.lazyStartProducer = lazyStartProducer; + } + + public Object getOldValue() { + return oldValue; + } + + public void setOldValue(Object oldValue) { + this.oldValue = oldValue; + } + + public InfinispanOperation getOperation() { + return operation; + } + + public void setOperation(InfinispanOperation operation) { + this.operation = operation; + } + + public Object getValue() { + return value; + } + + public void setValue(Object value) { + this.value = value; + } + + public Boolean getAutowiredEnabled() { + return autowiredEnabled; + } + + public void setAutowiredEnabled(Boolean autowiredEnabled) { + this.autowiredEnabled = autowiredEnabled; + } + + public EmbeddedCacheManager getCacheContainer() { + return cacheContainer; + } + + public void setCacheContainer(EmbeddedCacheManager cacheContainer) { + this.cacheContainer = cacheContainer; + } + + public Configuration getCacheContainerConfiguration() { + return cacheContainerConfiguration; + } + + public void setCacheContainerConfiguration( + Configuration cacheContainerConfiguration) { + this.cacheContainerConfiguration = cacheContainerConfiguration; + } + + public String getConfigurationUri() { + return configurationUri; + } + + public void setConfigurationUri(String configurationUri) { + this.configurationUri = configurationUri; + } + + public String getFlags() { + return flags; + } + + public void setFlags(String flags) { + this.flags = flags; + } + + public BiFunction getRemappingFunction() { + return remappingFunction; + } + + public void setRemappingFunction(BiFunction remappingFunction) { + this.remappingFunction = remappingFunction; + } + + public String getResultHeader() { + return resultHeader; + } + + public void setResultHeader(String resultHeader) { + this.resultHeader = resultHeader; + } +} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/InfinispanComponentConverter.java b/components-starter/camel-infinispan-embedded-starter/src/main/java/org/apache/camel/component/infinispan/embedded/springboot/InfinispanEmbeddedComponentConverter.java similarity index 68% rename from components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/InfinispanComponentConverter.java rename to components-starter/camel-infinispan-embedded-starter/src/main/java/org/apache/camel/component/infinispan/embedded/springboot/InfinispanEmbeddedComponentConverter.java index 1d00dbc47f4..5622811ef27 100644 --- a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/InfinispanComponentConverter.java +++ b/components-starter/camel-infinispan-embedded-starter/src/main/java/org/apache/camel/component/infinispan/embedded/springboot/InfinispanEmbeddedComponentConverter.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.component.infinispan.springboot; +package org.apache.camel.component.infinispan.embedded.springboot; import java.util.LinkedHashSet; import java.util.Set; @@ -27,23 +27,24 @@ * Generated by camel-package-maven-plugin - do not edit this file! */ @Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo") -public class InfinispanComponentConverter +public class InfinispanEmbeddedComponentConverter implements org.springframework.core.convert.converter.GenericConverter { private final CamelContext camelContext; - public InfinispanComponentConverter( + public InfinispanEmbeddedComponentConverter( org.apache.camel.CamelContext camelContext) { this.camelContext = camelContext; } public Set getConvertibleTypes() { Set answer = new LinkedHashSet<>(); - answer.add(new ConvertiblePair(String.class, org.apache.camel.component.infinispan.InfinispanConfiguration.class)); + answer.add(new ConvertiblePair(String.class, org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration.class)); answer.add(new ConvertiblePair(String.class, org.apache.camel.component.infinispan.InfinispanQueryBuilder.class)); - answer.add(new ConvertiblePair(String.class, org.apache.camel.component.infinispan.InfinispanCustomListener.class)); - answer.add(new ConvertiblePair(String.class, org.infinispan.commons.api.BasicCacheContainer.class)); + answer.add(new ConvertiblePair(String.class, org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedCustomListener.class)); + answer.add(new ConvertiblePair(String.class, org.infinispan.manager.EmbeddedCacheManager.class)); + answer.add(new ConvertiblePair(String.class, org.infinispan.configuration.cache.Configuration.class)); answer.add(new ConvertiblePair(String.class, java.util.function.BiFunction.class)); return answer; } @@ -61,10 +62,11 @@ public Object convert( } ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1); switch (targetType.getName()) { - case "org.apache.camel.component.infinispan.InfinispanConfiguration": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.infinispan.InfinispanConfiguration.class); + case "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration.class); case "org.apache.camel.component.infinispan.InfinispanQueryBuilder": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.infinispan.InfinispanQueryBuilder.class); - case "org.apache.camel.component.infinispan.InfinispanCustomListener": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.infinispan.InfinispanCustomListener.class); - case "org.infinispan.commons.api.BasicCacheContainer": return camelContext.getRegistry().lookupByNameAndType(ref, org.infinispan.commons.api.BasicCacheContainer.class); + case "org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedCustomListener": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedCustomListener.class); + case "org.infinispan.manager.EmbeddedCacheManager": return camelContext.getRegistry().lookupByNameAndType(ref, org.infinispan.manager.EmbeddedCacheManager.class); + case "org.infinispan.configuration.cache.Configuration": return camelContext.getRegistry().lookupByNameAndType(ref, org.infinispan.configuration.cache.Configuration.class); case "java.util.function.BiFunction": return camelContext.getRegistry().lookupByNameAndType(ref, java.util.function.BiFunction.class); } return null; diff --git a/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/LICENSE.txt b/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/LICENSE.txt new file mode 100644 index 00000000000..6b0b1270ff0 --- /dev/null +++ b/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/LICENSE.txt @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/NOTICE.txt b/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/NOTICE.txt new file mode 100644 index 00000000000..2e215bf2e6b --- /dev/null +++ b/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/NOTICE.txt @@ -0,0 +1,11 @@ + ========================================================================= + == NOTICE file corresponding to the section 4 d of == + == the Apache License, Version 2.0, == + == in this case for the Apache Camel distribution. == + ========================================================================= + + This product includes software developed by + The Apache Software Foundation (http://www.apache.org/). + + Please read the different LICENSE files present in the licenses directory of + this distribution. diff --git a/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/spring.factories b/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/spring.factories new file mode 100644 index 00000000000..8bb7c756110 --- /dev/null +++ b/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/spring.factories @@ -0,0 +1,19 @@ +## --------------------------------------------------------------------------- +## Licensed to the Apache Software Foundation (ASF) under one or more +## contributor license agreements. See the NOTICE file distributed with +## this work for additional information regarding copyright ownership. +## The ASF licenses this file to You under the Apache License, Version 2.0 +## (the "License"); you may not use this file except in compliance with +## the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, software +## distributed under the License is distributed on an "AS IS" BASIS, +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +## See the License for the specific language governing permissions and +## limitations under the License. +## --------------------------------------------------------------------------- + +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ +org.apache.camel.component.infinispan.embedded.springboot.InfinispanEmbeddedComponentAutoConfiguration diff --git a/components-starter/camel-infinispan-starter/src/test/resources/application.properties b/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/spring.provides similarity index 96% rename from components-starter/camel-infinispan-starter/src/test/resources/application.properties rename to components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/spring.provides index 8d7f9c81af1..7e71a18338d 100644 --- a/components-starter/camel-infinispan-starter/src/test/resources/application.properties +++ b/components-starter/camel-infinispan-embedded-starter/src/main/resources/META-INF/spring.provides @@ -14,5 +14,4 @@ ## See the License for the specific language governing permissions and ## limitations under the License. ## --------------------------------------------------------------------------- - -spring.main.banner-mode = off +provides: camel-infinispan-embedded diff --git a/components-starter/camel-infinispan-starter/pom.xml b/components-starter/camel-infinispan-starter/pom.xml index f1a55487dbe..f3700750d54 100644 --- a/components-starter/camel-infinispan-starter/pom.xml +++ b/components-starter/camel-infinispan-starter/pom.xml @@ -26,8 +26,8 @@ camel-infinispan-starter jar - Camel SB Starters :: Infinispan - Spring-Boot Starter for Camel Infinispan support + + org.springframework.boot @@ -39,12 +39,6 @@ camel-infinispan ${camel-version} - - org.infinispan - infinispan-spring-boot-starter - ${infinispan-spring-boot-version} - test - org.apache.camel.springboot @@ -56,15 +50,4 @@ - - - - - maven-surefire-plugin - - true - - - - diff --git a/components-starter/camel-infinispan-starter/src/main/docs/infinispan-starter.adoc b/components-starter/camel-infinispan-starter/src/main/docs/infinispan-starter.adoc index a7a049a7281..246002e0e1b 100644 --- a/components-starter/camel-infinispan-starter/src/main/docs/infinispan-starter.adoc +++ b/components-starter/camel-infinispan-starter/src/main/docs/infinispan-starter.adoc @@ -17,7 +17,7 @@ When using infinispan with Spring Boot make sure to use the following Maven depe ---- -The component supports 34 options, which are listed below. +The component supports 27 options, which are listed below. @@ -26,37 +26,32 @@ The component supports 34 options, which are listed below. | Name | Description | Default | Type | *camel.component.infinispan.autowired-enabled* | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean | *camel.component.infinispan.bridge-error-handler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean -| *camel.component.infinispan.cache-container* | Specifies the cache Container to connect. The option is a org.infinispan.commons.api.BasicCacheContainer type. | | BasicCacheContainer -| *camel.component.infinispan.cache-container-configuration* | The CacheContainer configuration. Uses if the cacheContainer is not defined. Must be the following types: org.infinispan.client.hotrod.configuration.Configuration - for remote cache interaction configuration; org.infinispan.configuration.cache.Configuration - for embedded cache interaction configuration;. The option is a java.lang.Object type. | | Object -| *camel.component.infinispan.clustered-listener* | If true, the listener will be installed for the entire cluster | false | Boolean -| *camel.component.infinispan.configuration* | Component configuration. The option is a org.apache.camel.component.infinispan.InfinispanConfiguration type. | | InfinispanConfiguration +| *camel.component.infinispan.cache-container* | Specifies the cache Container to connect. The option is a org.infinispan.client.hotrod.RemoteCacheManager type. | | RemoteCacheManager +| *camel.component.infinispan.cache-container-configuration* | The CacheContainer configuration. Used if the cacheContainer is not defined. The option is a org.infinispan.client.hotrod.configuration.Configuration type. | | Configuration +| *camel.component.infinispan.configuration* | Component configuration. The option is a org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration type. | | InfinispanRemoteConfiguration | *camel.component.infinispan.configuration-properties* | Implementation specific properties for the CacheManager | | Map | *camel.component.infinispan.configuration-uri* | An implementation specific URI for the CacheManager | | String -| *camel.component.infinispan.custom-listener* | Returns the custom listener in use, if provided. The option is a org.apache.camel.component.infinispan.InfinispanCustomListener type. | | InfinispanCustomListener -| *camel.component.infinispan.customizer.embedded-cache-manager.enabled* | Enable or disable the cache-manager customizer. | true | Boolean -| *camel.component.infinispan.customizer.embedded-cache-manager.override* | Configure if the cache manager eventually set on the component should be overridden by the customizer. | false | Boolean -| *camel.component.infinispan.customizer.remote-cache-manager.enabled* | Enable or disable the cache-manager customizer. | true | Boolean -| *camel.component.infinispan.customizer.remote-cache-manager.override* | Configure if the cache manager eventually set on the component should be overridden by the customizer. | false | Boolean +| *camel.component.infinispan.custom-listener* | Returns the custom listener in use, if provided. The option is a org.apache.camel.component.infinispan.remote.InfinispanRemoteCustomListener type. | | InfinispanRemoteCustomListener | *camel.component.infinispan.default-value* | Set a specific default value for some producer operations. The option is a java.lang.Object type. | | Object | *camel.component.infinispan.enabled* | Whether to enable auto configuration of the infinispan component. This is enabled by default. | | Boolean -| *camel.component.infinispan.event-types* | Specifies the set of event types to register by the consumer. Multiple event can be separated by comma. The possible event types are: CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, DATA_REHASHED, TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED | | String -| *camel.component.infinispan.flags* | A comma separated list of Flag to be applied by default on each cache invocation, not applicable to remote caches. | | String +| *camel.component.infinispan.event-types* | Specifies the set of event types to register by the consumer.Multiple event can be separated by comma. The possible event types are: CLIENT_CACHE_ENTRY_CREATED, CLIENT_CACHE_ENTRY_MODIFIED, CLIENT_CACHE_ENTRY_REMOVED, CLIENT_CACHE_ENTRY_EXPIRED, CLIENT_CACHE_FAILOVER | | String +| *camel.component.infinispan.flags* | A comma separated list of org.infinispan.client.hotrod.Flag to be applied by default on each cache invocation. | | String | *camel.component.infinispan.hosts* | Specifies the host of the cache on Infinispan instance | | String | *camel.component.infinispan.key* | Set a specific key for producer operations. The option is a java.lang.Object type. | | Object | *camel.component.infinispan.lazy-start-producer* | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean | *camel.component.infinispan.old-value* | Set a specific old value for some producer operations. The option is a java.lang.Object type. | | Object -| *camel.component.infinispan.operation* | The operation to perform. | | InfinispanOperation +| *camel.component.infinispan.operation* | The operation to perform | | InfinispanOperation | *camel.component.infinispan.password* | Define the password to access the infinispan instance | | String | *camel.component.infinispan.query-builder* | Specifies the query builder. The option is a org.apache.camel.component.infinispan.InfinispanQueryBuilder type. | | InfinispanQueryBuilder | *camel.component.infinispan.remapping-function* | Set a specific remappingFunction to use in a compute operation. The option is a java.util.function.BiFunction type. | | BiFunction -| *camel.component.infinispan.result-header* | Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader. The option is a java.lang.Object type. | | Object +| *camel.component.infinispan.result-header* | Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader | | String | *camel.component.infinispan.sasl-mechanism* | Define the SASL Mechanism to access the infinispan instance | | String | *camel.component.infinispan.secure* | Define if we are connecting to a secured Infinispan instance | false | Boolean | *camel.component.infinispan.security-realm* | Define the security realm to access the infinispan instance | | String | *camel.component.infinispan.security-server-name* | Define the security server name to access the infinispan instance | | String -| *camel.component.infinispan.sync* | If true, the consumer will receive notifications synchronously | true | Boolean | *camel.component.infinispan.username* | Define the username to access the infinispan instance | | String | *camel.component.infinispan.value* | Set a specific value for producer operations. The option is a java.lang.Object type. | | Object -| *camel.component.infinispan.command* | *Deprecated* The operation to perform. | PUT | String |=== + + // spring-boot-auto-configure options: END diff --git a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/InfinispanComponentAutoConfiguration.java b/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/remote/springboot/InfinispanRemoteComponentAutoConfiguration.java similarity index 85% rename from components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/InfinispanComponentAutoConfiguration.java rename to components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/remote/springboot/InfinispanRemoteComponentAutoConfiguration.java index 3b7056bf0fb..e22c392b1b4 100644 --- a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/InfinispanComponentAutoConfiguration.java +++ b/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/remote/springboot/InfinispanRemoteComponentAutoConfiguration.java @@ -14,12 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.component.infinispan.springboot; +package org.apache.camel.component.infinispan.remote.springboot; import javax.annotation.Generated; import org.apache.camel.CamelContext; import org.apache.camel.Component; -import org.apache.camel.component.infinispan.InfinispanComponent; +import org.apache.camel.component.infinispan.remote.InfinispanRemoteComponent; import org.apache.camel.spi.ComponentCustomizer; import org.apache.camel.spring.boot.CamelAutoConfiguration; import org.apache.camel.spring.boot.ComponentConfigurationProperties; @@ -44,26 +44,26 @@ @Configuration(proxyBeanMethods = false) @AutoConfigureAfter(CamelAutoConfiguration.class) @Conditional(ConditionalOnCamelContextAndAutoConfigurationBeans.class) -@EnableConfigurationProperties({ComponentConfigurationProperties.class,InfinispanComponentConfiguration.class}) +@EnableConfigurationProperties({ComponentConfigurationProperties.class,InfinispanRemoteComponentConfiguration.class}) @ConditionalOnHierarchicalProperties({"camel.component", "camel.component.infinispan"}) -public class InfinispanComponentAutoConfiguration { +public class InfinispanRemoteComponentAutoConfiguration { @Autowired private ApplicationContext applicationContext; private final CamelContext camelContext; @Autowired - private InfinispanComponentConfiguration configuration; + private InfinispanRemoteComponentConfiguration configuration; - public InfinispanComponentAutoConfiguration( + public InfinispanRemoteComponentAutoConfiguration( org.apache.camel.CamelContext camelContext) { this.camelContext = camelContext; ApplicationConversionService acs = (ApplicationConversionService) ApplicationConversionService.getSharedInstance(); - acs.addConverter(new InfinispanComponentConverter(camelContext)); + acs.addConverter(new InfinispanRemoteComponentConverter(camelContext)); } @Lazy @Bean - public ComponentCustomizer configureInfinispanComponent() { + public ComponentCustomizer configureInfinispanRemoteComponent() { return new ComponentCustomizer() { @Override public void configure(String name, Component target) { @@ -75,7 +75,7 @@ public boolean isEnabled(String name, Component target) { applicationContext, "camel.component.customizer", "camel.component.infinispan.customizer") - && target instanceof InfinispanComponent; + && target instanceof InfinispanRemoteComponent; } }; } diff --git a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/InfinispanComponentConfiguration.java b/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/remote/springboot/InfinispanRemoteComponentConfiguration.java similarity index 76% rename from components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/InfinispanComponentConfiguration.java rename to components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/remote/springboot/InfinispanRemoteComponentConfiguration.java index e8a126ac6d6..f64c761b9c1 100644 --- a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/InfinispanComponentConfiguration.java +++ b/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/remote/springboot/InfinispanRemoteComponentConfiguration.java @@ -14,20 +14,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.component.infinispan.springboot; +package org.apache.camel.component.infinispan.remote.springboot; import java.util.Map; import java.util.function.BiFunction; import javax.annotation.Generated; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.InfinispanConfiguration; -import org.apache.camel.component.infinispan.InfinispanCustomListener; import org.apache.camel.component.infinispan.InfinispanOperation; import org.apache.camel.component.infinispan.InfinispanQueryBuilder; +import org.apache.camel.component.infinispan.remote.InfinispanRemoteComponent; +import org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration; +import org.apache.camel.component.infinispan.remote.InfinispanRemoteCustomListener; import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon; -import org.infinispan.commons.api.BasicCacheContainer; +import org.infinispan.client.hotrod.RemoteCacheManager; +import org.infinispan.client.hotrod.configuration.Configuration; import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.context.properties.DeprecatedConfigurationProperty; /** * Read and write from/to Infinispan distributed key/value store and data grid. @@ -36,7 +36,7 @@ */ @Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo") @ConfigurationProperties(prefix = "camel.component.infinispan") -public class InfinispanComponentConfiguration +public class InfinispanRemoteComponentConfiguration extends ComponentConfigurationPropertiesCommon { @@ -47,9 +47,9 @@ public class InfinispanComponentConfiguration private Boolean enabled; /** * Component configuration. The option is a - * org.apache.camel.component.infinispan.InfinispanConfiguration type. + * org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration type. */ - private InfinispanConfiguration configuration; + private InfinispanRemoteConfiguration configuration; /** * Specifies the host of the cache on Infinispan instance */ @@ -72,34 +72,19 @@ public class InfinispanComponentConfiguration * will be logged at WARN or ERROR level and ignored. */ private Boolean bridgeErrorHandler = false; - /** - * If true, the listener will be installed for the entire cluster - */ - private Boolean clusteredListener = false; - /** - * The operation to perform. - */ - @Deprecated - private String command = "PUT"; /** * Returns the custom listener in use, if provided. The option is a - * org.apache.camel.component.infinispan.InfinispanCustomListener type. + * org.apache.camel.component.infinispan.remote.InfinispanRemoteCustomListener type. */ - private InfinispanCustomListener customListener; + private InfinispanRemoteCustomListener customListener; /** - * Specifies the set of event types to register by the consumer. Multiple + * Specifies the set of event types to register by the consumer.Multiple * event can be separated by comma. The possible event types are: - * CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, - * CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, - * CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, - * TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, DATA_REHASHED, - * TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED + * CLIENT_CACHE_ENTRY_CREATED, CLIENT_CACHE_ENTRY_MODIFIED, + * CLIENT_CACHE_ENTRY_REMOVED, CLIENT_CACHE_ENTRY_EXPIRED, + * CLIENT_CACHE_FAILOVER */ private String eventTypes; - /** - * If true, the consumer will receive notifications synchronously - */ - private Boolean sync = true; /** * Set a specific default value for some producer operations. The option is * a java.lang.Object type. @@ -127,7 +112,7 @@ public class InfinispanComponentConfiguration */ private Object oldValue; /** - * The operation to perform. + * The operation to perform */ private InfinispanOperation operation = InfinispanOperation.PUT; /** @@ -166,18 +151,15 @@ public class InfinispanComponentConfiguration private Boolean autowiredEnabled = true; /** * Specifies the cache Container to connect. The option is a - * org.infinispan.commons.api.BasicCacheContainer type. + * org.infinispan.client.hotrod.RemoteCacheManager type. */ - private BasicCacheContainer cacheContainer; + private RemoteCacheManager cacheContainer; /** - * The CacheContainer configuration. Uses if the cacheContainer is not - * defined. Must be the following types: - * org.infinispan.client.hotrod.configuration.Configuration - for remote - * cache interaction configuration; - * org.infinispan.configuration.cache.Configuration - for embedded cache - * interaction configuration;. The option is a java.lang.Object type. + * The CacheContainer configuration. Used if the cacheContainer is not + * defined. The option is a + * org.infinispan.client.hotrod.configuration.Configuration type. */ - private Object cacheContainerConfiguration; + private Configuration cacheContainerConfiguration; /** * Implementation specific properties for the CacheManager */ @@ -187,8 +169,8 @@ public class InfinispanComponentConfiguration */ private String configurationUri; /** - * A comma separated list of Flag to be applied by default on each cache - * invocation, not applicable to remote caches. + * A comma separated list of org.infinispan.client.hotrod.Flag to be applied + * by default on each cache invocation. */ private String flags; /** @@ -203,16 +185,15 @@ public class InfinispanComponentConfiguration * resultHeader is set, the value is used as the name of the header to store * the query result and the original message body is preserved. This value * can be overridden by an in message header named: - * CamelInfinispanOperationResultHeader. The option is a java.lang.Object - * type. + * CamelInfinispanOperationResultHeader */ - private Object resultHeader; + private String resultHeader; - public InfinispanConfiguration getConfiguration() { + public InfinispanRemoteConfiguration getConfiguration() { return configuration; } - public void setConfiguration(InfinispanConfiguration configuration) { + public void setConfiguration(InfinispanRemoteConfiguration configuration) { this.configuration = configuration; } @@ -248,30 +229,11 @@ public void setBridgeErrorHandler(Boolean bridgeErrorHandler) { this.bridgeErrorHandler = bridgeErrorHandler; } - public Boolean getClusteredListener() { - return clusteredListener; - } - - public void setClusteredListener(Boolean clusteredListener) { - this.clusteredListener = clusteredListener; - } - - @Deprecated - @DeprecatedConfigurationProperty - public String getCommand() { - return command; - } - - @Deprecated - public void setCommand(String command) { - this.command = command; - } - - public InfinispanCustomListener getCustomListener() { + public InfinispanRemoteCustomListener getCustomListener() { return customListener; } - public void setCustomListener(InfinispanCustomListener customListener) { + public void setCustomListener(InfinispanRemoteCustomListener customListener) { this.customListener = customListener; } @@ -283,14 +245,6 @@ public void setEventTypes(String eventTypes) { this.eventTypes = eventTypes; } - public Boolean getSync() { - return sync; - } - - public void setSync(Boolean sync) { - this.sync = sync; - } - public Object getDefaultValue() { return defaultValue; } @@ -387,20 +341,20 @@ public void setAutowiredEnabled(Boolean autowiredEnabled) { this.autowiredEnabled = autowiredEnabled; } - public BasicCacheContainer getCacheContainer() { + public RemoteCacheManager getCacheContainer() { return cacheContainer; } - public void setCacheContainer(BasicCacheContainer cacheContainer) { + public void setCacheContainer(RemoteCacheManager cacheContainer) { this.cacheContainer = cacheContainer; } - public Object getCacheContainerConfiguration() { + public Configuration getCacheContainerConfiguration() { return cacheContainerConfiguration; } public void setCacheContainerConfiguration( - Object cacheContainerConfiguration) { + Configuration cacheContainerConfiguration) { this.cacheContainerConfiguration = cacheContainerConfiguration; } @@ -437,11 +391,11 @@ public void setRemappingFunction(BiFunction remappingFunction) { this.remappingFunction = remappingFunction; } - public Object getResultHeader() { + public String getResultHeader() { return resultHeader; } - public void setResultHeader(Object resultHeader) { + public void setResultHeader(String resultHeader) { this.resultHeader = resultHeader; } } \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/remote/springboot/InfinispanRemoteComponentConverter.java b/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/remote/springboot/InfinispanRemoteComponentConverter.java new file mode 100644 index 00000000000..5c84eb3463e --- /dev/null +++ b/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/remote/springboot/InfinispanRemoteComponentConverter.java @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.component.infinispan.remote.springboot; + +import java.util.LinkedHashSet; +import java.util.Set; +import javax.annotation.Generated; +import org.apache.camel.CamelContext; +import org.springframework.core.convert.TypeDescriptor; +import org.springframework.core.convert.converter.GenericConverter; + +/** + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Generated("org.apache.camel.springboot.maven.SpringBootAutoConfigurationMojo") +public class InfinispanRemoteComponentConverter + implements + org.springframework.core.convert.converter.GenericConverter { + + private final CamelContext camelContext; + + public InfinispanRemoteComponentConverter( + org.apache.camel.CamelContext camelContext) { + this.camelContext = camelContext; + } + + public Set getConvertibleTypes() { + Set answer = new LinkedHashSet<>(); + answer.add(new ConvertiblePair(String.class, org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration.class)); + answer.add(new ConvertiblePair(String.class, org.apache.camel.component.infinispan.InfinispanQueryBuilder.class)); + answer.add(new ConvertiblePair(String.class, org.apache.camel.component.infinispan.remote.InfinispanRemoteCustomListener.class)); + answer.add(new ConvertiblePair(String.class, org.infinispan.client.hotrod.RemoteCacheManager.class)); + answer.add(new ConvertiblePair(String.class, org.infinispan.client.hotrod.configuration.Configuration.class)); + answer.add(new ConvertiblePair(String.class, java.util.function.BiFunction.class)); + return answer; + } + + public Object convert( + Object source, + TypeDescriptor sourceType, + TypeDescriptor targetType) { + if (source == null) { + return null; + } + String ref = source.toString(); + if (!ref.startsWith("#")) { + return null; + } + ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1); + switch (targetType.getName()) { + case "org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration.class); + case "org.apache.camel.component.infinispan.InfinispanQueryBuilder": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.infinispan.InfinispanQueryBuilder.class); + case "org.apache.camel.component.infinispan.remote.InfinispanRemoteCustomListener": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.infinispan.remote.InfinispanRemoteCustomListener.class); + case "org.infinispan.client.hotrod.RemoteCacheManager": return camelContext.getRegistry().lookupByNameAndType(ref, org.infinispan.client.hotrod.RemoteCacheManager.class); + case "org.infinispan.client.hotrod.configuration.Configuration": return camelContext.getRegistry().lookupByNameAndType(ref, org.infinispan.client.hotrod.configuration.Configuration.class); + case "java.util.function.BiFunction": return camelContext.getRegistry().lookupByNameAndType(ref, java.util.function.BiFunction.class); + } + return null; + } +} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/EmbeddedCacheManagerCustomizer.java b/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/EmbeddedCacheManagerCustomizer.java deleted file mode 100644 index c0e055fa70f..00000000000 --- a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/EmbeddedCacheManagerCustomizer.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.infinispan.springboot.customizer; - -import org.apache.camel.Component; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.springboot.InfinispanComponentAutoConfiguration; -import org.apache.camel.spi.ComponentCustomizer; -import org.apache.camel.spi.HasId; -import org.apache.camel.spring.boot.CamelAutoConfiguration; -import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator; -import org.infinispan.manager.EmbeddedCacheManager; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.AutoConfigureBefore; -import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration; -import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Configuration; - -@Configuration -@ConditionalOnBean({ EmbeddedCacheManager.class, CamelAutoConfiguration.class }) -@AutoConfigureAfter({ CamelAutoConfiguration.class, CacheAutoConfiguration.class }) -@EnableConfigurationProperties(EmbeddedCacheManagerCustomizerConfiguration.class) -public class EmbeddedCacheManagerCustomizer implements HasId, ComponentCustomizer { - @Autowired - private ApplicationContext applicationContext; - @Autowired - private EmbeddedCacheManager cacheManager; - @Autowired - private EmbeddedCacheManagerCustomizerConfiguration configuration; - - @Override - public void configure(String name, Component target) { - InfinispanComponent component = (InfinispanComponent)target; - - // Set the cache manager only if the customizer is configured to always - // set it or if no cache manager is already configured on component - if (configuration.isOverride() || component.getConfiguration().getCacheContainer() == null) { - component.getConfiguration().setCacheContainer(cacheManager); - } - } - - @Override - public boolean isEnabled(String name, Component target) { - return HierarchicalPropertiesEvaluator.evaluate( - applicationContext, - "camel.component.customizer", - "camel.component.infinispan.customizer", - getId()) - && target instanceof InfinispanComponent; - } - - @Override - public int getOrder() { - return 101; - } - - @Override - public String getId() { - return "camel.component.infinispan.customizer.embedded-cache-manager"; - } -} diff --git a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/EmbeddedCacheManagerCustomizerConfiguration.java b/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/EmbeddedCacheManagerCustomizerConfiguration.java deleted file mode 100644 index 4192d7c47f7..00000000000 --- a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/EmbeddedCacheManagerCustomizerConfiguration.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.infinispan.springboot.customizer; - -import org.springframework.boot.context.properties.ConfigurationProperties; - -@ConfigurationProperties(prefix = "camel.component.infinispan.customizer.embedded-cache-manager") -public class EmbeddedCacheManagerCustomizerConfiguration { - /** - * Enable or disable the cache-manager customizer. - */ - private boolean enabled = true; - - /** - * Configure if the cache manager eventually set on the component should be overridden by the customizer. - */ - private boolean override; - - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public boolean isOverride() { - return override; - } - - public void setOverride(boolean override) { - this.override = override; - } -} diff --git a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/RemoteCacheManagerCustomizer.java b/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/RemoteCacheManagerCustomizer.java deleted file mode 100644 index 6ad1ccb3982..00000000000 --- a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/RemoteCacheManagerCustomizer.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.infinispan.springboot.customizer; - -import org.apache.camel.Component; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.spi.ComponentCustomizer; -import org.apache.camel.spi.HasId; -import org.apache.camel.spring.boot.CamelAutoConfiguration; -import org.apache.camel.spring.boot.util.HierarchicalPropertiesEvaluator; -import org.infinispan.client.hotrod.RemoteCacheManager; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Configuration; - -@Configuration -@ConditionalOnBean({CamelAutoConfiguration.class, RemoteCacheManager.class}) -@AutoConfigureAfter(CamelAutoConfiguration.class) -@EnableConfigurationProperties(RemoteCacheManagerCustomizerConfiguration.class) -public class RemoteCacheManagerCustomizer implements HasId, ComponentCustomizer { - @Autowired - private ApplicationContext applicationContext; - @Autowired - private RemoteCacheManager cacheManager; - @Autowired - private RemoteCacheManagerCustomizerConfiguration configuration; - - @Override - public void configure(String name, Component target) { - InfinispanComponent component = (InfinispanComponent)target; - - // Set the cache manager only if the customizer is configured to always - // set it or if no cache manager is already configured on component - if (configuration.isOverride() || component.getConfiguration().getCacheContainer() == null) { - component.getConfiguration().setCacheContainer(cacheManager); - } - } - - @Override - public boolean isEnabled(String name, Component target) { - return HierarchicalPropertiesEvaluator.evaluate( - applicationContext, - "camel.component.customizer", - "camel.component.infinispan.customizer", - getId()) - && target instanceof InfinispanComponent; - } - - @Override - public int getOrder() { - return 100; - } - - @Override - public String getId() { - return "camel.component.infinispan.customizer.remote-cache-manager"; - } -} diff --git a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/RemoteCacheManagerCustomizerConfiguration.java b/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/RemoteCacheManagerCustomizerConfiguration.java deleted file mode 100644 index 42626e82f79..00000000000 --- a/components-starter/camel-infinispan-starter/src/main/java/org/apache/camel/component/infinispan/springboot/customizer/RemoteCacheManagerCustomizerConfiguration.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.infinispan.springboot.customizer; - -import org.springframework.boot.context.properties.ConfigurationProperties; - -@ConfigurationProperties(prefix = "camel.component.infinispan.customizer.remote-cache-manager") -public class RemoteCacheManagerCustomizerConfiguration { - /** - * Enable or disable the cache-manager customizer. - */ - private boolean enabled = true; - - /** - * Configure if the cache manager eventually set on the component should be overridden by the customizer. - */ - private boolean override; - - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public boolean isOverride() { - return override; - } - - public void setOverride(boolean override) { - this.override = override; - } -} diff --git a/components-starter/camel-infinispan-starter/src/main/resources/META-INF/spring.factories b/components-starter/camel-infinispan-starter/src/main/resources/META-INF/spring.factories index 6ac73e9c1f3..12af0768a47 100644 --- a/components-starter/camel-infinispan-starter/src/main/resources/META-INF/spring.factories +++ b/components-starter/camel-infinispan-starter/src/main/resources/META-INF/spring.factories @@ -14,7 +14,6 @@ ## See the License for the specific language governing permissions and ## limitations under the License. ## --------------------------------------------------------------------------- + org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ -org.apache.camel.component.infinispan.springboot.customizer.RemoteCacheManagerCustomizer,\ -org.apache.camel.component.infinispan.springboot.customizer.EmbeddedCacheManagerCustomizer,\ -org.apache.camel.component.infinispan.springboot.InfinispanComponentAutoConfiguration +org.apache.camel.component.infinispan.remote.springboot.InfinispanRemoteComponentAutoConfiguration diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerNotEnabledTestBase.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerNotEnabledTestBase.java deleted file mode 100644 index b63d8c4a32c..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerNotEnabledTestBase.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.infinispan.client.hotrod.RemoteCacheManager; -import org.infinispan.manager.EmbeddedCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -class CacheManagerCustomizerNotEnabledTestBase { - @Autowired - EmbeddedCacheManager embeddedCacheManager; - @Autowired - RemoteCacheManager remoteCacheManager; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(embeddedCacheManager); - Assert.assertNotNull(remoteCacheManager); - Assert.assertNotNull(component); - Assert.assertNull(component.getConfiguration().getCacheContainer()); - } - - @Configuration - public static class TestConfiguration { - @Bean - public EmbeddedCacheManager embeddedCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newEmbeddedCacheManagerInstance(); - } - @Bean - public RemoteCacheManager remoteCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newRemoteCacheManagerInstance(); - } - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerSelectionForceEmbeddedTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerSelectionForceEmbeddedTest.java deleted file mode 100644 index ded21c6d352..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerSelectionForceEmbeddedTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.springboot.InfinispanComponentAutoConfiguration; -import org.apache.camel.spring.boot.CamelAutoConfiguration; -import org.infinispan.client.hotrod.RemoteCacheManager; -import org.infinispan.manager.EmbeddedCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.AutoConfigureBefore; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - CacheManagerCustomizerSelectionForceEmbeddedTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=false", - "infinispan.remote.enabled=false", - "camel.component.infinispan.customizer.embedded-cache-manager.enabled=true", - "camel.component.infinispan.customizer.remote-cache-manager.enabled=false" - }) -public class CacheManagerCustomizerSelectionForceEmbeddedTest { - @Autowired - RemoteCacheManager remoteCacheManager; - @Autowired - EmbeddedCacheManager embeddedCacheManager; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(remoteCacheManager); - Assert.assertNotNull(embeddedCacheManager); - Assert.assertNotNull(component); - Assert.assertNotNull(component.getConfiguration().getCacheContainer()); - Assert.assertSame(embeddedCacheManager, component.getConfiguration().getCacheContainer()); - } - - @Configuration - @AutoConfigureAfter(CamelAutoConfiguration.class) - @AutoConfigureBefore(InfinispanComponentAutoConfiguration.class) - public static class TestConfiguration { - @Bean - public EmbeddedCacheManager embeddedCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newEmbeddedCacheManagerInstance(); - } - @Bean - public RemoteCacheManager remoteCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newRemoteCacheManagerInstance(); - } - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerSelectionForceRemoteTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerSelectionForceRemoteTest.java deleted file mode 100644 index 64ddda4d91b..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerSelectionForceRemoteTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.springboot.InfinispanComponentAutoConfiguration; -import org.apache.camel.spring.boot.CamelAutoConfiguration; -import org.infinispan.client.hotrod.RemoteCacheManager; -import org.infinispan.manager.EmbeddedCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.AutoConfigureBefore; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - CacheManagerCustomizerSelectionForceRemoteTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=false", - "infinispan.remote.enabled=false", - "camel.component.infinispan.customizer.embedded-cache-manager.enabled=false", - "camel.component.infinispan.customizer.remote-cache-manager.enabled=true" - }) -public class CacheManagerCustomizerSelectionForceRemoteTest { - @Autowired - RemoteCacheManager remoteCacheManager; - @Autowired - EmbeddedCacheManager embeddedCacheManager; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(remoteCacheManager); - Assert.assertNotNull(embeddedCacheManager); - Assert.assertNotNull(component); - Assert.assertNotNull(component.getConfiguration().getCacheContainer()); - Assert.assertSame(remoteCacheManager, component.getConfiguration().getCacheContainer()); - } - - @Configuration - @AutoConfigureAfter(CamelAutoConfiguration.class) - @AutoConfigureBefore(InfinispanComponentAutoConfiguration.class) - public static class TestConfiguration { - @Bean - public EmbeddedCacheManager embeddedCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newEmbeddedCacheManagerInstance(); - } - @Bean - public RemoteCacheManager remoteCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newRemoteCacheManagerInstance(); - } - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerSelectionTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerSelectionTest.java deleted file mode 100644 index e793c468ff8..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerSelectionTest.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.springboot.InfinispanComponentAutoConfiguration; -import org.apache.camel.spring.boot.CamelAutoConfiguration; -import org.infinispan.client.hotrod.RemoteCacheManager; -import org.infinispan.manager.EmbeddedCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.AutoConfigureBefore; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - CacheManagerCustomizerSelectionTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=false", - "infinispan.remote.enabled=false", - "camel.component.infinispan.customizer.embedded-cache-manager.enabled=true", - "camel.component.infinispan.customizer.remote-cache-manager.enabled=true" - }) -public class CacheManagerCustomizerSelectionTest { - @Autowired - RemoteCacheManager remoteCacheManager; - @Autowired - EmbeddedCacheManager embeddedCacheManager; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(remoteCacheManager); - Assert.assertNotNull(embeddedCacheManager); - Assert.assertNotNull(component); - Assert.assertNotNull(component.getConfiguration().getCacheContainer()); - Assert.assertSame(remoteCacheManager, component.getConfiguration().getCacheContainer()); - } - - @Configuration - @AutoConfigureAfter(CamelAutoConfiguration.class) - @AutoConfigureBefore(InfinispanComponentAutoConfiguration.class) - public static class TestConfiguration { - @Bean - public EmbeddedCacheManager embeddedCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newEmbeddedCacheManagerInstance(); - } - @Bean - public RemoteCacheManager remoteCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newRemoteCacheManagerInstance(); - } - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerTestSupport.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerTestSupport.java deleted file mode 100644 index 13d25be1ded..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerTestSupport.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.infinispan.client.hotrod.RemoteCacheManager; -import org.infinispan.manager.DefaultCacheManager; -import org.infinispan.manager.EmbeddedCacheManager; - -public final class CacheManagerCustomizerTestSupport { - private CacheManagerCustomizerTestSupport() { - } - - public static EmbeddedCacheManager newEmbeddedCacheManagerInstance() { - return new DefaultCacheManager( - new org.infinispan.configuration.global.GlobalConfigurationBuilder() - .build(), - new org.infinispan.configuration.cache.ConfigurationBuilder() - .build(), - false - ); - } - - public static RemoteCacheManager newRemoteCacheManagerInstance() { - return new RemoteCacheManager( - new org.infinispan.client.hotrod.configuration.ConfigurationBuilder() - .build(), - false); - } -} diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerWithInfinispanStarterTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerWithInfinispanStarterTest.java deleted file mode 100644 index cbca49dfa1b..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerWithInfinispanStarterTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.infinispan.manager.EmbeddedCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - CacheManagerCustomizerWithInfinispanStarterTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=true", - "infinispan.remote.enabled=false" - }) -public class CacheManagerCustomizerWithInfinispanStarterTest { - @Autowired - EmbeddedCacheManager cacheManager; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() throws Exception { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(cacheManager); - Assert.assertNotNull(component); - Assert.assertSame(cacheManager, component.getConfiguration().getCacheContainer()); - } - - @Configuration - public static class TestConfiguration { - } -} diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerWithoutCacheManagerTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerWithoutCacheManagerTest.java deleted file mode 100644 index 4c6e47cb00c..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/CacheManagerCustomizerWithoutCacheManagerTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.springboot.customizer.EmbeddedCacheManagerCustomizer; -import org.apache.camel.component.infinispan.springboot.customizer.RemoteCacheManagerCustomizer; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - CacheManagerCustomizerWithoutCacheManagerTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=false", - "infinispan.remote.enabled=false", - "camel.component.infinispan.customizer.embedded-cache-manager.enabled=true", - "camel.component.infinispan.customizer.remote-cache-manager.enabled=true" - }) -public class CacheManagerCustomizerWithoutCacheManagerTest { - @Autowired - InfinispanComponent component; - @Autowired - ApplicationContext applicationContext; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(component); - Assert.assertNull(component.getConfiguration().getCacheContainer()); - Assert.assertEquals(0, applicationContext.getBeansOfType(EmbeddedCacheManagerCustomizer.class).size()); - Assert.assertEquals(0, applicationContext.getBeansOfType(RemoteCacheManagerCustomizer.class).size()); - } - - @Configuration - public static class TestConfiguration { - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/EmbeddedCacheManagerCustomizerNoOverrideTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/EmbeddedCacheManagerCustomizerNoOverrideTest.java deleted file mode 100644 index 32ec7d98ef3..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/EmbeddedCacheManagerCustomizerNoOverrideTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.Ordered; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.springboot.InfinispanComponentAutoConfiguration; -import org.apache.camel.spi.ComponentCustomizer; -import org.apache.camel.spring.boot.CamelAutoConfiguration; -import org.infinispan.manager.EmbeddedCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.AutoConfigureBefore; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - EmbeddedCacheManagerCustomizerNoOverrideTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=false", - "infinispan.remote.enabled=false", - "camel.component.infinispan.customizer.embedded-cache-manager.enabled=true", - "camel.component.infinispan.customizer.embedded-cache-manager.override=false", - "camel.component.infinispan.customizer.remote-cache-manager.enabled=false" - }) -public class EmbeddedCacheManagerCustomizerNoOverrideTest { - private static final EmbeddedCacheManager CACHE_MANAGER = CacheManagerCustomizerTestSupport.newEmbeddedCacheManagerInstance(); - - @Autowired - EmbeddedCacheManager cacheManager; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(cacheManager); - Assert.assertNotNull(component); - Assert.assertNotNull(component.getConfiguration().getCacheContainer()); - Assert.assertSame(CACHE_MANAGER, component.getConfiguration().getCacheContainer()); - } - - @Configuration - @AutoConfigureAfter(CamelAutoConfiguration.class) - @AutoConfigureBefore(InfinispanComponentAutoConfiguration.class) - public static class TestConfiguration { - @Bean - public ComponentCustomizer customizer() { - return ComponentCustomizer.builder(InfinispanComponent.class) - .withOrder(Ordered.HIGHEST) - .build(component -> component.getConfiguration().setCacheContainer(CACHE_MANAGER)); - } - - @Bean(destroyMethod = "stop") - public EmbeddedCacheManager embeddedCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newEmbeddedCacheManagerInstance(); - } - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/EmbeddedCacheManagerCustomizerOverrideTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/EmbeddedCacheManagerCustomizerOverrideTest.java deleted file mode 100644 index 74becfae097..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/EmbeddedCacheManagerCustomizerOverrideTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.Ordered; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.springboot.InfinispanComponentAutoConfiguration; -import org.apache.camel.spi.ComponentCustomizer; -import org.apache.camel.spring.boot.CamelAutoConfiguration; -import org.infinispan.manager.EmbeddedCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.AutoConfigureBefore; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - EmbeddedCacheManagerCustomizerOverrideTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=false", - "infinispan.remote.enabled=false", - "camel.component.infinispan.customizer.embedded-cache-manager.enabled=true", - "camel.component.infinispan.customizer.embedded-cache-manager.override=true", - "camel.component.infinispan.customizer.remote-cache-manager.enabled=false" - }) -public class EmbeddedCacheManagerCustomizerOverrideTest { - private static final EmbeddedCacheManager CACHE_MANAGER = CacheManagerCustomizerTestSupport.newEmbeddedCacheManagerInstance(); - - @Autowired - EmbeddedCacheManager cacheManager; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(cacheManager); - Assert.assertNotNull(component); - Assert.assertNotNull(component.getConfiguration().getCacheContainer()); - Assert.assertSame(cacheManager, component.getConfiguration().getCacheContainer()); - } - - @Configuration - @AutoConfigureAfter(CamelAutoConfiguration.class) - @AutoConfigureBefore(InfinispanComponentAutoConfiguration.class) - public static class TestConfiguration { - @Bean - public ComponentCustomizer customizer() { - return ComponentCustomizer.builder(InfinispanComponent.class) - .withOrder(Ordered.HIGHEST) - .build(component -> component.getConfiguration().setCacheContainer(CACHE_MANAGER)); - } - - @Bean(destroyMethod = "stop") - public EmbeddedCacheManager embeddedCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newEmbeddedCacheManagerInstance(); - } - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/EmbeddedCacheManagerCustomizerTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/EmbeddedCacheManagerCustomizerTest.java deleted file mode 100644 index 68a65bdaa7a..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/EmbeddedCacheManagerCustomizerTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.infinispan.manager.EmbeddedCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - EmbeddedCacheManagerCustomizerTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=false", - "infinispan.remote.enabled=false" - }) -public class EmbeddedCacheManagerCustomizerTest { - @Autowired - EmbeddedCacheManager cacheManager; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(cacheManager); - Assert.assertNotNull(component); - Assert.assertSame(cacheManager, component.getConfiguration().getCacheContainer()); - } - - @Configuration - public static class TestConfiguration { - @Bean - public EmbeddedCacheManager embeddedCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newEmbeddedCacheManagerInstance(); - } - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/RemoteCacheManagerCustomizerNoOverrideTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/RemoteCacheManagerCustomizerNoOverrideTest.java deleted file mode 100644 index 3f3e629ff4c..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/RemoteCacheManagerCustomizerNoOverrideTest.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.Ordered; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.springboot.InfinispanComponentAutoConfiguration; -import org.apache.camel.spi.ComponentCustomizer; -import org.apache.camel.spring.boot.CamelAutoConfiguration; -import org.infinispan.client.hotrod.RemoteCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.AutoConfigureBefore; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - RemoteCacheManagerCustomizerNoOverrideTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=false", - "infinispan.remote.enabled=false", - "camel.component.infinispan.customizer.embedded-cache-manager.enabled=false", - "camel.component.infinispan.customizer.embedded-cache-manager.override=false", - "camel.component.infinispan.customizer.remote-cache-manager.enabled=true", - "camel.component.infinispan.customizer.remote-cache-manager.override=false", - }) -public class RemoteCacheManagerCustomizerNoOverrideTest { - private static final RemoteCacheManager CACHE_MANAGER = CacheManagerCustomizerTestSupport.newRemoteCacheManagerInstance(); - - @Autowired - RemoteCacheManager cacheManager; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(cacheManager); - Assert.assertNotNull(component); - Assert.assertNotNull(component.getConfiguration().getCacheContainer()); - Assert.assertSame(CACHE_MANAGER, component.getConfiguration().getCacheContainer()); - } - - @Configuration - @AutoConfigureAfter(CamelAutoConfiguration.class) - @AutoConfigureBefore(InfinispanComponentAutoConfiguration.class) - public static class TestConfiguration { - @Bean - public ComponentCustomizer customizer() { - return ComponentCustomizer.builder(InfinispanComponent.class) - .withOrder(Ordered.HIGHEST) - .build(component -> component.getConfiguration().setCacheContainer(CACHE_MANAGER)); - } - - @Bean - public RemoteCacheManager remoteCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newRemoteCacheManagerInstance(); - } - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/RemoteCacheManagerCustomizerOverrideTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/RemoteCacheManagerCustomizerOverrideTest.java deleted file mode 100644 index 337adf16c46..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/RemoteCacheManagerCustomizerOverrideTest.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.Ordered; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.springboot.InfinispanComponentAutoConfiguration; -import org.apache.camel.spi.ComponentCustomizer; -import org.apache.camel.spring.boot.CamelAutoConfiguration; -import org.infinispan.client.hotrod.RemoteCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.AutoConfigureAfter; -import org.springframework.boot.autoconfigure.AutoConfigureBefore; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - RemoteCacheManagerCustomizerOverrideTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=false", - "infinispan.remote.enabled=false", - "camel.component.infinispan.customizer.embedded-cache-manager.enabled=false", - "camel.component.infinispan.customizer.embedded-cache-manager.override=false", - "camel.component.infinispan.customizer.remote-cache-manager.enabled=true", - "camel.component.infinispan.customizer.remote-cache-manager.override=true", - }) -public class RemoteCacheManagerCustomizerOverrideTest { - private static final RemoteCacheManager CACHE_MANAGER = CacheManagerCustomizerTestSupport.newRemoteCacheManagerInstance(); - - @Autowired - RemoteCacheManager cacheManager; - @Autowired - CamelContext context; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(cacheManager); - Assert.assertNotNull(component); - Assert.assertNotNull(component.getConfiguration().getCacheContainer()); - Assert.assertSame(cacheManager, component.getConfiguration().getCacheContainer()); - } - - @Configuration - @AutoConfigureAfter(CamelAutoConfiguration.class) - @AutoConfigureBefore(InfinispanComponentAutoConfiguration.class) - public static class TestConfiguration { - @Bean - public ComponentCustomizer customizer() { - return ComponentCustomizer.builder(InfinispanComponent.class) - .withOrder(Ordered.HIGHEST) - .build(component -> component.getConfiguration().setCacheContainer(CACHE_MANAGER)); - } - - @Bean - public RemoteCacheManager remoteCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newRemoteCacheManagerInstance(); - } - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/RemoteCacheManagerCustomizerTest.java b/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/RemoteCacheManagerCustomizerTest.java deleted file mode 100644 index 8544d73510a..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/java/org/apache/camel/component/ehcache/springboot/RemoteCacheManagerCustomizerTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.component.ehcache.springboot; - -import org.apache.camel.CamelContext; -import org.apache.camel.component.infinispan.InfinispanComponent; -import org.apache.camel.component.infinispan.springboot.customizer.EmbeddedCacheManagerCustomizer; -import org.apache.camel.component.infinispan.springboot.customizer.RemoteCacheManagerCustomizer; -import org.infinispan.client.hotrod.RemoteCacheManager; -import org.infinispan.manager.EmbeddedCacheManager; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit4.SpringRunner; - -@RunWith(SpringRunner.class) -@DirtiesContext -@SpringBootApplication -@SpringBootTest( - classes = { - RemoteCacheManagerCustomizerTest.TestConfiguration.class - }, - properties = { - "debug=false", - "infinispan.embedded.enabled=false", - "infinispan.remote.enabled=false" - }) -public class RemoteCacheManagerCustomizerTest { - @Autowired - EmbeddedCacheManager embeddedCacheManager; - @Autowired - RemoteCacheManager remoteCacheManager; - @Autowired - CamelContext context; - @Autowired - ApplicationContext applicationContext; - - @Test - public void testComponentConfiguration() { - InfinispanComponent component = context.getComponent("infinispan", InfinispanComponent.class); - - Assert.assertNotNull(embeddedCacheManager); - Assert.assertNotNull(remoteCacheManager); - Assert.assertNotNull(component); - Assert.assertSame(remoteCacheManager, component.getConfiguration().getCacheContainer()); - Assert.assertEquals(1, applicationContext.getBeansOfType(EmbeddedCacheManagerCustomizer.class).size()); - Assert.assertEquals(1, applicationContext.getBeansOfType(RemoteCacheManagerCustomizer.class).size()); - } - - @Configuration - public static class TestConfiguration { - @Bean - public EmbeddedCacheManager embeddedCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newEmbeddedCacheManagerInstance(); - } - @Bean - public RemoteCacheManager remoteCacheManagerInstance() { - return CacheManagerCustomizerTestSupport.newRemoteCacheManagerInstance(); - } - } -} \ No newline at end of file diff --git a/components-starter/camel-infinispan-starter/src/test/resources/logback.xml b/components-starter/camel-infinispan-starter/src/test/resources/logback.xml deleted file mode 100644 index a9808876044..00000000000 --- a/components-starter/camel-infinispan-starter/src/test/resources/logback.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - %d{HH:mm:ss.SSS} [%-15.15thread] %-5level %-30.30logger - %msg%n - - - - - - %d{HH:mm:ss.SSS} [%-15.15thread] %-5level %-30.30logger - %msg%n - - target/camel-infinispan-starter-test.log - - - - - - - - - \ No newline at end of file diff --git a/components-starter/pom.xml b/components-starter/pom.xml index b4a10dc7e5a..a503a783e73 100644 --- a/components-starter/pom.xml +++ b/components-starter/pom.xml @@ -263,6 +263,7 @@ camel-ical-starter camel-iec60870-starter camel-ignite-starter + camel-infinispan-embedded-starter camel-infinispan-starter camel-influxdb-starter camel-iota-starter diff --git a/docs/modules/ROOT/pages/infinispan-embedded-starter.adoc b/docs/modules/ROOT/pages/infinispan-embedded-starter.adoc new file mode 100644 index 00000000000..9db39d79801 --- /dev/null +++ b/docs/modules/ROOT/pages/infinispan-embedded-starter.adoc @@ -0,0 +1,51 @@ +// spring-boot-auto-configure options: START +:page-partial: +:doctitle: Camel Spring Boot Starter for infinispan-embedded + +== Spring Boot Auto-Configuration + +When using infinispan-embedded with Spring Boot make sure to use the following Maven dependency to have support for auto configuration: + +[source,xml] +---- + + org.apache.camel.springboot + camel-infinispan-embedded-starter + x.x.x + + +---- + + +The component supports 21 options, which are listed below. + + + +[width="100%",cols="2,5,^1,2",options="header"] +|=== +| Name | Description | Default | Type +| *camel.component.infinispan-embedded.autowired-enabled* | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean +| *camel.component.infinispan-embedded.bridge-error-handler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean +| *camel.component.infinispan-embedded.cache-container* | Specifies the cache Container to connect. The option is a org.infinispan.manager.EmbeddedCacheManager type. | | EmbeddedCacheManager +| *camel.component.infinispan-embedded.cache-container-configuration* | The CacheContainer configuration. Used if the cacheContainer is not defined. The option is a org.infinispan.configuration.cache.Configuration type. | | Configuration +| *camel.component.infinispan-embedded.clustered-listener* | If true, the listener will be installed for the entire cluster | false | Boolean +| *camel.component.infinispan-embedded.configuration* | Component configuration. The option is a org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedConfiguration type. | | InfinispanEmbeddedConfiguration +| *camel.component.infinispan-embedded.configuration-uri* | An implementation specific URI for the CacheManager | | String +| *camel.component.infinispan-embedded.custom-listener* | Returns the custom listener in use, if provided. The option is a org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedCustomListener type. | | InfinispanEmbeddedCustomListener +| *camel.component.infinispan-embedded.default-value* | Set a specific default value for some producer operations. The option is a java.lang.Object type. | | Object +| *camel.component.infinispan-embedded.enabled* | Whether to enable auto configuration of the infinispan-embedded component. This is enabled by default. | | Boolean +| *camel.component.infinispan-embedded.event-types* | Specifies the set of event types to register by the consumer.Multiple event can be separated by comma. The possible event types are: CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, CACHE_ENTRY_EXPIRED, DATA_REHASHED, TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED, PERSISTENCE_AVAILABILITY_CHANGED | | String +| *camel.component.infinispan-embedded.flags* | A comma separated list of org.infinispan.context.Flag to be applied by default on each cache invocation | | String +| *camel.component.infinispan-embedded.key* | Set a specific key for producer operations. The option is a java.lang.Object type. | | Object +| *camel.component.infinispan-embedded.lazy-start-producer* | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean +| *camel.component.infinispan-embedded.old-value* | Set a specific old value for some producer operations. The option is a java.lang.Object type. | | Object +| *camel.component.infinispan-embedded.operation* | The operation to perform | | InfinispanOperation +| *camel.component.infinispan-embedded.query-builder* | Specifies the query builder. The option is a org.apache.camel.component.infinispan.InfinispanQueryBuilder type. | | InfinispanQueryBuilder +| *camel.component.infinispan-embedded.remapping-function* | Set a specific remappingFunction to use in a compute operation. The option is a java.util.function.BiFunction type. | | BiFunction +| *camel.component.infinispan-embedded.result-header* | Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader | | String +| *camel.component.infinispan-embedded.sync* | If true, the consumer will receive notifications synchronously | true | Boolean +| *camel.component.infinispan-embedded.value* | Set a specific value for producer operations. The option is a java.lang.Object type. | | Object +|=== + + +// spring-boot-auto-configure options: END diff --git a/docs/modules/ROOT/pages/infinispan-starter.adoc b/docs/modules/ROOT/pages/infinispan-starter.adoc index a7a049a7281..246002e0e1b 100644 --- a/docs/modules/ROOT/pages/infinispan-starter.adoc +++ b/docs/modules/ROOT/pages/infinispan-starter.adoc @@ -17,7 +17,7 @@ When using infinispan with Spring Boot make sure to use the following Maven depe ---- -The component supports 34 options, which are listed below. +The component supports 27 options, which are listed below. @@ -26,37 +26,32 @@ The component supports 34 options, which are listed below. | Name | Description | Default | Type | *camel.component.infinispan.autowired-enabled* | Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | Boolean | *camel.component.infinispan.bridge-error-handler* | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | Boolean -| *camel.component.infinispan.cache-container* | Specifies the cache Container to connect. The option is a org.infinispan.commons.api.BasicCacheContainer type. | | BasicCacheContainer -| *camel.component.infinispan.cache-container-configuration* | The CacheContainer configuration. Uses if the cacheContainer is not defined. Must be the following types: org.infinispan.client.hotrod.configuration.Configuration - for remote cache interaction configuration; org.infinispan.configuration.cache.Configuration - for embedded cache interaction configuration;. The option is a java.lang.Object type. | | Object -| *camel.component.infinispan.clustered-listener* | If true, the listener will be installed for the entire cluster | false | Boolean -| *camel.component.infinispan.configuration* | Component configuration. The option is a org.apache.camel.component.infinispan.InfinispanConfiguration type. | | InfinispanConfiguration +| *camel.component.infinispan.cache-container* | Specifies the cache Container to connect. The option is a org.infinispan.client.hotrod.RemoteCacheManager type. | | RemoteCacheManager +| *camel.component.infinispan.cache-container-configuration* | The CacheContainer configuration. Used if the cacheContainer is not defined. The option is a org.infinispan.client.hotrod.configuration.Configuration type. | | Configuration +| *camel.component.infinispan.configuration* | Component configuration. The option is a org.apache.camel.component.infinispan.remote.InfinispanRemoteConfiguration type. | | InfinispanRemoteConfiguration | *camel.component.infinispan.configuration-properties* | Implementation specific properties for the CacheManager | | Map | *camel.component.infinispan.configuration-uri* | An implementation specific URI for the CacheManager | | String -| *camel.component.infinispan.custom-listener* | Returns the custom listener in use, if provided. The option is a org.apache.camel.component.infinispan.InfinispanCustomListener type. | | InfinispanCustomListener -| *camel.component.infinispan.customizer.embedded-cache-manager.enabled* | Enable or disable the cache-manager customizer. | true | Boolean -| *camel.component.infinispan.customizer.embedded-cache-manager.override* | Configure if the cache manager eventually set on the component should be overridden by the customizer. | false | Boolean -| *camel.component.infinispan.customizer.remote-cache-manager.enabled* | Enable or disable the cache-manager customizer. | true | Boolean -| *camel.component.infinispan.customizer.remote-cache-manager.override* | Configure if the cache manager eventually set on the component should be overridden by the customizer. | false | Boolean +| *camel.component.infinispan.custom-listener* | Returns the custom listener in use, if provided. The option is a org.apache.camel.component.infinispan.remote.InfinispanRemoteCustomListener type. | | InfinispanRemoteCustomListener | *camel.component.infinispan.default-value* | Set a specific default value for some producer operations. The option is a java.lang.Object type. | | Object | *camel.component.infinispan.enabled* | Whether to enable auto configuration of the infinispan component. This is enabled by default. | | Boolean -| *camel.component.infinispan.event-types* | Specifies the set of event types to register by the consumer. Multiple event can be separated by comma. The possible event types are: CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, CACHE_ENTRY_VISITED, CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, TRANSACTION_REGISTERED, CACHE_ENTRY_INVALIDATED, DATA_REHASHED, TOPOLOGY_CHANGED, PARTITION_STATUS_CHANGED | | String -| *camel.component.infinispan.flags* | A comma separated list of Flag to be applied by default on each cache invocation, not applicable to remote caches. | | String +| *camel.component.infinispan.event-types* | Specifies the set of event types to register by the consumer.Multiple event can be separated by comma. The possible event types are: CLIENT_CACHE_ENTRY_CREATED, CLIENT_CACHE_ENTRY_MODIFIED, CLIENT_CACHE_ENTRY_REMOVED, CLIENT_CACHE_ENTRY_EXPIRED, CLIENT_CACHE_FAILOVER | | String +| *camel.component.infinispan.flags* | A comma separated list of org.infinispan.client.hotrod.Flag to be applied by default on each cache invocation. | | String | *camel.component.infinispan.hosts* | Specifies the host of the cache on Infinispan instance | | String | *camel.component.infinispan.key* | Set a specific key for producer operations. The option is a java.lang.Object type. | | Object | *camel.component.infinispan.lazy-start-producer* | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | Boolean | *camel.component.infinispan.old-value* | Set a specific old value for some producer operations. The option is a java.lang.Object type. | | Object -| *camel.component.infinispan.operation* | The operation to perform. | | InfinispanOperation +| *camel.component.infinispan.operation* | The operation to perform | | InfinispanOperation | *camel.component.infinispan.password* | Define the password to access the infinispan instance | | String | *camel.component.infinispan.query-builder* | Specifies the query builder. The option is a org.apache.camel.component.infinispan.InfinispanQueryBuilder type. | | InfinispanQueryBuilder | *camel.component.infinispan.remapping-function* | Set a specific remappingFunction to use in a compute operation. The option is a java.util.function.BiFunction type. | | BiFunction -| *camel.component.infinispan.result-header* | Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader. The option is a java.lang.Object type. | | Object +| *camel.component.infinispan.result-header* | Store the operation result in a header instead of the message body. By default, resultHeader == null and the query result is stored in the message body, any existing content in the message body is discarded. If resultHeader is set, the value is used as the name of the header to store the query result and the original message body is preserved. This value can be overridden by an in message header named: CamelInfinispanOperationResultHeader | | String | *camel.component.infinispan.sasl-mechanism* | Define the SASL Mechanism to access the infinispan instance | | String | *camel.component.infinispan.secure* | Define if we are connecting to a secured Infinispan instance | false | Boolean | *camel.component.infinispan.security-realm* | Define the security realm to access the infinispan instance | | String | *camel.component.infinispan.security-server-name* | Define the security server name to access the infinispan instance | | String -| *camel.component.infinispan.sync* | If true, the consumer will receive notifications synchronously | true | Boolean | *camel.component.infinispan.username* | Define the username to access the infinispan instance | | String | *camel.component.infinispan.value* | Set a specific value for producer operations. The option is a java.lang.Object type. | | Object -| *camel.component.infinispan.command* | *Deprecated* The operation to perform. | PUT | String |=== + + // spring-boot-auto-configure options: END diff --git a/docs/modules/ROOT/pages/list.adoc b/docs/modules/ROOT/pages/list.adoc index 9d0fb6ce173..dbbdcf971a9 100644 --- a/docs/modules/ROOT/pages/list.adoc +++ b/docs/modules/ROOT/pages/list.adoc @@ -5,7 +5,7 @@ Apache Camel Spring Boot supports the following Camel artifacts as Spring Boot S == Camel Components // components: START -Number of Camel components: 343 in 276 JAR artifacts (3 deprecated) +Number of Camel components: 344 in 277 JAR artifacts (3 deprecated) [width="100%",cols="4,3,3,3,6",options="header"] |=== @@ -347,6 +347,8 @@ Number of Camel components: 343 in 276 JAR artifacts (3 deprecated) | xref:latest@components::infinispan-component.adoc[Infinispan] | camel-infinispan-starter | Stable | 2.13 | Read and write from/to Infinispan distributed key/value store and data grid. +| xref:latest@components::infinispan-embedded-component.adoc[Infinispan Embedded] | camel-infinispan-embedded-starter | Stable | 2.13 | Read and write from/to Infinispan distributed key/value store and data grid. + | xref:latest@components::influxdb-component.adoc[InfluxDB] | camel-influxdb-starter | Stable | 2.18 | Interact with InfluxDB, a time series database. | xref:latest@components::iota-component.adoc[IOTA] | camel-iota-starter | Stable | 2.23 | Manage financial transactions using IOTA distributed ledger. diff --git a/tooling/camel-spring-boot-bom/pom.xml b/tooling/camel-spring-boot-bom/pom.xml index 510831f6773..178fa713ba8 100644 --- a/tooling/camel-spring-boot-bom/pom.xml +++ b/tooling/camel-spring-boot-bom/pom.xml @@ -797,6 +797,11 @@ camel-ignite-starter ${project.version} + + org.apache.camel.springboot + camel-infinispan-embedded-starter + ${project.version} + org.apache.camel.springboot camel-infinispan-starter diff --git a/tooling/camel-spring-boot-dependencies/pom.xml b/tooling/camel-spring-boot-dependencies/pom.xml index ee8439e44c6..858d6da9e36 100644 --- a/tooling/camel-spring-boot-dependencies/pom.xml +++ b/tooling/camel-spring-boot-dependencies/pom.xml @@ -1006,6 +1006,11 @@ camel-ignite-starter ${project.version} + + org.apache.camel.springboot + camel-infinispan-embedded-starter + ${project.version} + org.apache.camel.springboot camel-infinispan-starter @@ -2297,6 +2302,11 @@ camel-azure-storage-blob 3.8.0-SNAPSHOT + + org.apache.camel + camel-azure-storage-datalake + 3.8.0-SNAPSHOT + org.apache.camel camel-azure-storage-queue @@ -2922,6 +2932,21 @@ camel-infinispan 3.8.0-SNAPSHOT + + org.apache.camel + camel-infinispan-common + 3.8.0-SNAPSHOT + + + org.apache.camel + camel-infinispan-embedded + 3.8.0-SNAPSHOT + + + org.apache.camel + camel-infinispan-parent + 3.8.0-SNAPSHOT + org.apache.camel camel-influxdb @@ -3112,6 +3137,11 @@ camel-kafka 3.8.0-SNAPSHOT + + org.apache.camel + camel-kamelet + 3.8.0-SNAPSHOT + org.apache.camel camel-kubernetes