Repository: camel Updated Branches: refs/heads/master a47cee597 -> d79e9f623
CAMEL-10203: Spring boot - Auto configuration should not use primitive types Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d79e9f62 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d79e9f62 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d79e9f62 Branch: refs/heads/master Commit: d79e9f62357c4d82465e88ac3889fd2872345043 Parents: 558cb0a Author: Claus Ibsen <[email protected]> Authored: Fri Jul 29 10:45:09 2016 +0200 Committer: Claus Ibsen <[email protected]> Committed: Fri Jul 29 10:45:24 2016 +0200 ---------------------------------------------------------------------- .../PropertiesComponentConfiguration.java | 6 +- .../SchedulerComponentConfiguration.java | 6 +- .../springboot/SedaComponentConfiguration.java | 12 +-- .../springboot/StubComponentConfiguration.java | 12 +-- .../vm/springboot/VmComponentConfiguration.java | 12 +-- .../springboot/AMQPComponentConfiguration.java | 78 ++++++++++---------- .../DisruptorComponentConfiguration.java | 18 ++--- .../DisruptorVmComponentConfiguration.java | 18 ++--- .../springboot/HBaseComponentConfiguration.java | 6 +- .../springboot/HttpComponentConfiguration.java | 12 +-- .../springboot/JmsComponentConfiguration.java | 78 ++++++++++---------- .../NettyHttpComponentConfiguration.java | 6 +- .../springboot/NettyComponentConfiguration.java | 6 +- .../NettyHttpComponentConfiguration.java | 6 +- .../springboot/NettyComponentConfiguration.java | 6 +- .../QuartzComponentConfiguration.java | 6 +- .../QuartzComponentConfiguration.java | 6 +- .../RestletComponentConfiguration.java | 6 +- .../springboot/SparkComponentConfiguration.java | 24 +++--- .../springboot/SshComponentConfiguration.java | 6 +- .../TwitterComponentConfiguration.java | 6 +- .../springboot/VertxComponentConfiguration.java | 12 +-- .../SpringBootAutoConfigurationMojo.java | 29 ++++++-- 23 files changed, 196 insertions(+), 181 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java index ea98144..e031886 100644 --- a/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java +++ b/camel-core/src/main/java/org/apache/camel/component/properties/springboot/PropertiesComponentConfiguration.java @@ -105,7 +105,7 @@ public class PropertiesComponentConfiguration { /** * Sets the system property mode. */ - private int systemPropertiesMode; + private Integer systemPropertiesMode; public String[] getLocations() { return locations; @@ -220,11 +220,11 @@ public class PropertiesComponentConfiguration { this.overrideProperties = overrideProperties; } - public int getSystemPropertiesMode() { + public Integer getSystemPropertiesMode() { return systemPropertiesMode; } - public void setSystemPropertiesMode(int systemPropertiesMode) { + public void setSystemPropertiesMode(Integer systemPropertiesMode) { this.systemPropertiesMode = systemPropertiesMode; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentConfiguration.java index a4c7e6f..de7325f 100644 --- a/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentConfiguration.java +++ b/camel-core/src/main/java/org/apache/camel/component/scheduler/springboot/SchedulerComponentConfiguration.java @@ -31,13 +31,13 @@ public class SchedulerComponentConfiguration { * Number of threads used by the scheduling thread pool. Is by default using * a single thread */ - private int concurrentTasks; + private Integer concurrentTasks; - public int getConcurrentTasks() { + public Integer getConcurrentTasks() { return concurrentTasks; } - public void setConcurrentTasks(int concurrentTasks) { + public void setConcurrentTasks(Integer concurrentTasks) { this.concurrentTasks = concurrentTasks; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java index 888baf6..fe2c2c1 100644 --- a/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java +++ b/camel-core/src/main/java/org/apache/camel/component/seda/springboot/SedaComponentConfiguration.java @@ -33,29 +33,29 @@ public class SedaComponentConfiguration { * Sets the default maximum capacity of the SEDA queue (i.e. the number of * messages it can hold). */ - private int queueSize; + private Integer queueSize; /** * Sets the default number of concurrent threads processing exchanges. */ - private int concurrentConsumers; + private Integer concurrentConsumers; /** * Sets the default queue factory. */ private BlockingQueueFactory<Exchange> defaultQueueFactory; - public int getQueueSize() { + public Integer getQueueSize() { return queueSize; } - public void setQueueSize(int queueSize) { + public void setQueueSize(Integer queueSize) { this.queueSize = queueSize; } - public int getConcurrentConsumers() { + public Integer getConcurrentConsumers() { return concurrentConsumers; } - public void setConcurrentConsumers(int concurrentConsumers) { + public void setConcurrentConsumers(Integer concurrentConsumers) { this.concurrentConsumers = concurrentConsumers; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java index ae8dcad..d2db266 100644 --- a/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java +++ b/camel-core/src/main/java/org/apache/camel/component/stub/springboot/StubComponentConfiguration.java @@ -33,29 +33,29 @@ public class StubComponentConfiguration { * Sets the default maximum capacity of the SEDA queue (i.e. the number of * messages it can hold). */ - private int queueSize; + private Integer queueSize; /** * Sets the default number of concurrent threads processing exchanges. */ - private int concurrentConsumers; + private Integer concurrentConsumers; /** * Sets the default queue factory. */ private BlockingQueueFactory<Exchange> defaultQueueFactory; - public int getQueueSize() { + public Integer getQueueSize() { return queueSize; } - public void setQueueSize(int queueSize) { + public void setQueueSize(Integer queueSize) { this.queueSize = queueSize; } - public int getConcurrentConsumers() { + public Integer getConcurrentConsumers() { return concurrentConsumers; } - public void setConcurrentConsumers(int concurrentConsumers) { + public void setConcurrentConsumers(Integer concurrentConsumers) { this.concurrentConsumers = concurrentConsumers; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java b/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java index 1900510..bf6ffee 100644 --- a/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java +++ b/camel-core/src/main/java/org/apache/camel/component/vm/springboot/VmComponentConfiguration.java @@ -33,29 +33,29 @@ public class VmComponentConfiguration { * Sets the default maximum capacity of the SEDA queue (i.e. the number of * messages it can hold). */ - private int queueSize; + private Integer queueSize; /** * Sets the default number of concurrent threads processing exchanges. */ - private int concurrentConsumers; + private Integer concurrentConsumers; /** * Sets the default queue factory. */ private BlockingQueueFactory<Exchange> defaultQueueFactory; - public int getQueueSize() { + public Integer getQueueSize() { return queueSize; } - public void setQueueSize(int queueSize) { + public void setQueueSize(Integer queueSize) { this.queueSize = queueSize; } - public int getConcurrentConsumers() { + public Integer getConcurrentConsumers() { return concurrentConsumers; } - public void setConcurrentConsumers(int concurrentConsumers) { + public void setConcurrentConsumers(Integer concurrentConsumers) { this.concurrentConsumers = concurrentConsumers; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentConfiguration.java b/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentConfiguration.java index 3c81723..a2d67cb 100644 --- a/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentConfiguration.java +++ b/components/camel-amqp/src/main/java/org/apache/camel/component/amqp/springboot/AMQPComponentConfiguration.java @@ -74,7 +74,7 @@ public class AMQPComponentConfiguration { * vendor-specific extensions to the acknowledgment mode. For the regular * modes it is preferable to use the acknowledgementModeName instead. */ - private int acknowledgementMode; + private Integer acknowledgementMode; /** * Enables eager loading of JMS properties as soon as a message is loaded * which generally is inefficient as the JMS properties may not be required @@ -95,7 +95,7 @@ public class AMQPComponentConfiguration { * Sets the cache level by ID for the underlying JMS resources. See * cacheLevelName option for more details. */ - private int cacheLevel; + private Integer cacheLevel; /** * Sets the cache level by name for the underlying JMS resources. Possible * values are: CACHE_AUTO CACHE_CONNECTION CACHE_CONSUMER CACHE_NONE and @@ -128,13 +128,13 @@ public class AMQPComponentConfiguration { * request/reply over JMS then the option replyToConcurrentConsumers is used * to control number of concurrent consumers on the reply message listener. */ - private int concurrentConsumers; + private Integer concurrentConsumers; /** * Specifies the default number of concurrent consumers when doing * request/reply over JMS. See also the maxMessagesPerTask option to control * dynamic scaling up/down of threads. */ - private int replyToConcurrentConsumers; + private Integer replyToConcurrentConsumers; /** * Sets the default connection factory to be use */ @@ -210,12 +210,12 @@ public class AMQPComponentConfiguration { * case of dynamic scheduling; see the maxConcurrentConsumers setting). * There is additional doc available from Spring. */ - private int idleTaskExecutionLimit; + private Integer idleTaskExecutionLimit; /** * Specify the limit for the number of consumers that are allowed to be idle * at any given time. */ - private int idleConsumerLimit; + private Integer idleConsumerLimit; /** * Specifies the maximum number of concurrent consumers when consuming from * JMS (not for request/reply over JMS). See also the maxMessagesPerTask @@ -224,25 +224,25 @@ public class AMQPComponentConfiguration { * used to control number of concurrent consumers on the reply message * listener. */ - private int maxConcurrentConsumers; + private Integer maxConcurrentConsumers; /** * Specifies the maximum number of concurrent consumers when using * request/reply over JMS. See also the maxMessagesPerTask option to control * dynamic scaling up/down of threads. */ - private int replyToMaxConcurrentConsumers; + private Integer replyToMaxConcurrentConsumers; /** * Specifies the maximum number of concurrent consumers for continue routing * when timeout occurred when using request/reply over JMS. */ - private int replyOnTimeoutToMaxConcurrentConsumers; + private Integer replyOnTimeoutToMaxConcurrentConsumers; /** * The number of messages per task. -1 is unlimited. If you use a range for * concurrent consumers (eg min max) then this option can be used to set a * value to eg 100 to control how fast the consumers will shrink when less * work is required. */ - private int maxMessagesPerTask; + private Integer maxMessagesPerTask; /** * To use a custom Spring * org.springframework.jms.support.converter.MessageConverter so you can be @@ -282,7 +282,7 @@ public class AMQPComponentConfiguration { * is the lowest priority and 9 is the highest). The explicitQosEnabled * option must also be enabled in order for this option to have any effect. */ - private int priority; + private Integer priority; /** * Specifies whether to inhibit the delivery of messages published by its * own connection. @@ -334,7 +334,7 @@ public class AMQPComponentConfiguration { * The timeout value of the transaction (in seconds) if using transacted * mode. */ - private int transactionTimeout; + private Integer transactionTimeout; /** * Specifies whether to test the connection on startup. This ensures that * when Camel starts that all the JMS consumers have a valid connection to @@ -534,7 +534,7 @@ public class AMQPComponentConfiguration { * the actual correlation id when doing request/reply over JMS and when the * option useMessageIDAsCorrelationID is enabled. */ - private int waitForProvisionCorrelationToBeUpdatedCounter; + private Integer waitForProvisionCorrelationToBeUpdatedCounter; /** * Interval in millis to sleep each time while waiting for provisional * correlation id to be updated. @@ -566,11 +566,11 @@ public class AMQPComponentConfiguration { this.allowReplyManagerQuickStop = allowReplyManagerQuickStop; } - public int getAcknowledgementMode() { + public Integer getAcknowledgementMode() { return acknowledgementMode; } - public void setAcknowledgementMode(int acknowledgementMode) { + public void setAcknowledgementMode(Integer acknowledgementMode) { this.acknowledgementMode = acknowledgementMode; } @@ -598,11 +598,11 @@ public class AMQPComponentConfiguration { this.autoStartup = autoStartup; } - public int getCacheLevel() { + public Integer getCacheLevel() { return cacheLevel; } - public void setCacheLevel(int cacheLevel) { + public void setCacheLevel(Integer cacheLevel) { this.cacheLevel = cacheLevel; } @@ -630,19 +630,19 @@ public class AMQPComponentConfiguration { this.clientId = clientId; } - public int getConcurrentConsumers() { + public Integer getConcurrentConsumers() { return concurrentConsumers; } - public void setConcurrentConsumers(int concurrentConsumers) { + public void setConcurrentConsumers(Integer concurrentConsumers) { this.concurrentConsumers = concurrentConsumers; } - public int getReplyToConcurrentConsumers() { + public Integer getReplyToConcurrentConsumers() { return replyToConcurrentConsumers; } - public void setReplyToConcurrentConsumers(int replyToConcurrentConsumers) { + public void setReplyToConcurrentConsumers(Integer replyToConcurrentConsumers) { this.replyToConcurrentConsumers = replyToConcurrentConsumers; } @@ -743,53 +743,53 @@ public class AMQPComponentConfiguration { this.exposeListenerSession = exposeListenerSession; } - public int getIdleTaskExecutionLimit() { + public Integer getIdleTaskExecutionLimit() { return idleTaskExecutionLimit; } - public void setIdleTaskExecutionLimit(int idleTaskExecutionLimit) { + public void setIdleTaskExecutionLimit(Integer idleTaskExecutionLimit) { this.idleTaskExecutionLimit = idleTaskExecutionLimit; } - public int getIdleConsumerLimit() { + public Integer getIdleConsumerLimit() { return idleConsumerLimit; } - public void setIdleConsumerLimit(int idleConsumerLimit) { + public void setIdleConsumerLimit(Integer idleConsumerLimit) { this.idleConsumerLimit = idleConsumerLimit; } - public int getMaxConcurrentConsumers() { + public Integer getMaxConcurrentConsumers() { return maxConcurrentConsumers; } - public void setMaxConcurrentConsumers(int maxConcurrentConsumers) { + public void setMaxConcurrentConsumers(Integer maxConcurrentConsumers) { this.maxConcurrentConsumers = maxConcurrentConsumers; } - public int getReplyToMaxConcurrentConsumers() { + public Integer getReplyToMaxConcurrentConsumers() { return replyToMaxConcurrentConsumers; } public void setReplyToMaxConcurrentConsumers( - int replyToMaxConcurrentConsumers) { + Integer replyToMaxConcurrentConsumers) { this.replyToMaxConcurrentConsumers = replyToMaxConcurrentConsumers; } - public int getReplyOnTimeoutToMaxConcurrentConsumers() { + public Integer getReplyOnTimeoutToMaxConcurrentConsumers() { return replyOnTimeoutToMaxConcurrentConsumers; } public void setReplyOnTimeoutToMaxConcurrentConsumers( - int replyOnTimeoutToMaxConcurrentConsumers) { + Integer replyOnTimeoutToMaxConcurrentConsumers) { this.replyOnTimeoutToMaxConcurrentConsumers = replyOnTimeoutToMaxConcurrentConsumers; } - public int getMaxMessagesPerTask() { + public Integer getMaxMessagesPerTask() { return maxMessagesPerTask; } - public void setMaxMessagesPerTask(int maxMessagesPerTask) { + public void setMaxMessagesPerTask(Integer maxMessagesPerTask) { this.maxMessagesPerTask = maxMessagesPerTask; } @@ -842,11 +842,11 @@ public class AMQPComponentConfiguration { this.useMessageIDAsCorrelationID = useMessageIDAsCorrelationID; } - public int getPriority() { + public Integer getPriority() { return priority; } - public void setPriority(int priority) { + public void setPriority(Integer priority) { this.priority = priority; } @@ -935,11 +935,11 @@ public class AMQPComponentConfiguration { this.transactionName = transactionName; } - public int getTransactionTimeout() { + public Integer getTransactionTimeout() { return transactionTimeout; } - public void setTransactionTimeout(int transactionTimeout) { + public void setTransactionTimeout(Integer transactionTimeout) { this.transactionTimeout = transactionTimeout; } @@ -1132,12 +1132,12 @@ public class AMQPComponentConfiguration { this.messageCreatedStrategy = messageCreatedStrategy; } - public int getWaitForProvisionCorrelationToBeUpdatedCounter() { + public Integer getWaitForProvisionCorrelationToBeUpdatedCounter() { return waitForProvisionCorrelationToBeUpdatedCounter; } public void setWaitForProvisionCorrelationToBeUpdatedCounter( - int waitForProvisionCorrelationToBeUpdatedCounter) { + Integer waitForProvisionCorrelationToBeUpdatedCounter) { this.waitForProvisionCorrelationToBeUpdatedCounter = waitForProvisionCorrelationToBeUpdatedCounter; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentConfiguration.java b/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentConfiguration.java index 61056f2..a2294db 100644 --- a/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentConfiguration.java +++ b/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentConfiguration.java @@ -33,7 +33,7 @@ public class DisruptorComponentConfiguration { /** * To configure the default number of concurrent consumers */ - private int defaultConcurrentConsumers; + private Integer defaultConcurrentConsumers; /** * To configure the default value for multiple consumers */ @@ -57,17 +57,17 @@ public class DisruptorComponentConfiguration { * To configure the ring buffer size */ @Deprecated - private int queueSize; + private Integer queueSize; /** * To configure the ring buffer size */ - private int bufferSize; + private Integer bufferSize; - public int getDefaultConcurrentConsumers() { + public Integer getDefaultConcurrentConsumers() { return defaultConcurrentConsumers; } - public void setDefaultConcurrentConsumers(int defaultConcurrentConsumers) { + public void setDefaultConcurrentConsumers(Integer defaultConcurrentConsumers) { this.defaultConcurrentConsumers = defaultConcurrentConsumers; } @@ -105,20 +105,20 @@ public class DisruptorComponentConfiguration { @Deprecated @DeprecatedConfigurationProperty - public int getQueueSize() { + public Integer getQueueSize() { return queueSize; } @Deprecated - public void setQueueSize(int queueSize) { + public void setQueueSize(Integer queueSize) { this.queueSize = queueSize; } - public int getBufferSize() { + public Integer getBufferSize() { return bufferSize; } - public void setBufferSize(int bufferSize) { + public void setBufferSize(Integer bufferSize) { this.bufferSize = bufferSize; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentConfiguration.java b/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentConfiguration.java index aca3020..4054c51 100644 --- a/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentConfiguration.java +++ b/components/camel-disruptor/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentConfiguration.java @@ -33,7 +33,7 @@ public class DisruptorVmComponentConfiguration { /** * To configure the default number of concurrent consumers */ - private int defaultConcurrentConsumers; + private Integer defaultConcurrentConsumers; /** * To configure the default value for multiple consumers */ @@ -57,17 +57,17 @@ public class DisruptorVmComponentConfiguration { * To configure the ring buffer size */ @Deprecated - private int queueSize; + private Integer queueSize; /** * To configure the ring buffer size */ - private int bufferSize; + private Integer bufferSize; - public int getDefaultConcurrentConsumers() { + public Integer getDefaultConcurrentConsumers() { return defaultConcurrentConsumers; } - public void setDefaultConcurrentConsumers(int defaultConcurrentConsumers) { + public void setDefaultConcurrentConsumers(Integer defaultConcurrentConsumers) { this.defaultConcurrentConsumers = defaultConcurrentConsumers; } @@ -105,20 +105,20 @@ public class DisruptorVmComponentConfiguration { @Deprecated @DeprecatedConfigurationProperty - public int getQueueSize() { + public Integer getQueueSize() { return queueSize; } @Deprecated - public void setQueueSize(int queueSize) { + public void setQueueSize(Integer queueSize) { this.queueSize = queueSize; } - public int getBufferSize() { + public Integer getBufferSize() { return bufferSize; } - public void setBufferSize(int bufferSize) { + public void setBufferSize(Integer bufferSize) { this.bufferSize = bufferSize; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java b/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java index 613247a..4c4e2e9 100644 --- a/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java +++ b/components/camel-hbase/src/main/java/org/apache/camel/component/hbase/springboot/HBaseComponentConfiguration.java @@ -35,7 +35,7 @@ public class HBaseComponentConfiguration { * Maximum number of references to keep for each table in the HTable pool. * The default value is 10. */ - private int poolMaxSize; + private Integer poolMaxSize; public Configuration getConfiguration() { return configuration; @@ -45,11 +45,11 @@ public class HBaseComponentConfiguration { this.configuration = configuration; } - public int getPoolMaxSize() { + public Integer getPoolMaxSize() { return poolMaxSize; } - public void setPoolMaxSize(int poolMaxSize) { + public void setPoolMaxSize(Integer poolMaxSize) { this.poolMaxSize = poolMaxSize; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java index f3568e9..d9fdf95 100644 --- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java +++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/springboot/HttpComponentConfiguration.java @@ -82,11 +82,11 @@ public class HttpComponentConfiguration { /** * The maximum number of connections. */ - private int maxTotalConnections; + private Integer maxTotalConnections; /** * The maximum number of connections per route. */ - private int connectionsPerRoute; + private Integer connectionsPerRoute; /** * The time for connection to live the time unit is millisecond the default * value is always keep alive. @@ -174,19 +174,19 @@ public class HttpComponentConfiguration { this.x509HostnameVerifier = x509HostnameVerifier; } - public int getMaxTotalConnections() { + public Integer getMaxTotalConnections() { return maxTotalConnections; } - public void setMaxTotalConnections(int maxTotalConnections) { + public void setMaxTotalConnections(Integer maxTotalConnections) { this.maxTotalConnections = maxTotalConnections; } - public int getConnectionsPerRoute() { + public Integer getConnectionsPerRoute() { return connectionsPerRoute; } - public void setConnectionsPerRoute(int connectionsPerRoute) { + public void setConnectionsPerRoute(Integer connectionsPerRoute) { this.connectionsPerRoute = connectionsPerRoute; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-jms/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java b/components/camel-jms/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java index 284cbb2..1745f28 100644 --- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java +++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/springboot/JmsComponentConfiguration.java @@ -75,7 +75,7 @@ public class JmsComponentConfiguration { * vendor-specific extensions to the acknowledgment mode. For the regular * modes it is preferable to use the acknowledgementModeName instead. */ - private int acknowledgementMode; + private Integer acknowledgementMode; /** * Enables eager loading of JMS properties as soon as a message is loaded * which generally is inefficient as the JMS properties may not be required @@ -96,7 +96,7 @@ public class JmsComponentConfiguration { * Sets the cache level by ID for the underlying JMS resources. See * cacheLevelName option for more details. */ - private int cacheLevel; + private Integer cacheLevel; /** * Sets the cache level by name for the underlying JMS resources. Possible * values are: CACHE_AUTO CACHE_CONNECTION CACHE_CONSUMER CACHE_NONE and @@ -129,13 +129,13 @@ public class JmsComponentConfiguration { * request/reply over JMS then the option replyToConcurrentConsumers is used * to control number of concurrent consumers on the reply message listener. */ - private int concurrentConsumers; + private Integer concurrentConsumers; /** * Specifies the default number of concurrent consumers when doing * request/reply over JMS. See also the maxMessagesPerTask option to control * dynamic scaling up/down of threads. */ - private int replyToConcurrentConsumers; + private Integer replyToConcurrentConsumers; /** * Sets the default connection factory to be use */ @@ -211,12 +211,12 @@ public class JmsComponentConfiguration { * case of dynamic scheduling; see the maxConcurrentConsumers setting). * There is additional doc available from Spring. */ - private int idleTaskExecutionLimit; + private Integer idleTaskExecutionLimit; /** * Specify the limit for the number of consumers that are allowed to be idle * at any given time. */ - private int idleConsumerLimit; + private Integer idleConsumerLimit; /** * Specifies the maximum number of concurrent consumers when consuming from * JMS (not for request/reply over JMS). See also the maxMessagesPerTask @@ -225,25 +225,25 @@ public class JmsComponentConfiguration { * used to control number of concurrent consumers on the reply message * listener. */ - private int maxConcurrentConsumers; + private Integer maxConcurrentConsumers; /** * Specifies the maximum number of concurrent consumers when using * request/reply over JMS. See also the maxMessagesPerTask option to control * dynamic scaling up/down of threads. */ - private int replyToMaxConcurrentConsumers; + private Integer replyToMaxConcurrentConsumers; /** * Specifies the maximum number of concurrent consumers for continue routing * when timeout occurred when using request/reply over JMS. */ - private int replyOnTimeoutToMaxConcurrentConsumers; + private Integer replyOnTimeoutToMaxConcurrentConsumers; /** * The number of messages per task. -1 is unlimited. If you use a range for * concurrent consumers (eg min max) then this option can be used to set a * value to eg 100 to control how fast the consumers will shrink when less * work is required. */ - private int maxMessagesPerTask; + private Integer maxMessagesPerTask; /** * To use a custom Spring * org.springframework.jms.support.converter.MessageConverter so you can be @@ -283,7 +283,7 @@ public class JmsComponentConfiguration { * is the lowest priority and 9 is the highest). The explicitQosEnabled * option must also be enabled in order for this option to have any effect. */ - private int priority; + private Integer priority; /** * Specifies whether to inhibit the delivery of messages published by its * own connection. @@ -335,7 +335,7 @@ public class JmsComponentConfiguration { * The timeout value of the transaction (in seconds) if using transacted * mode. */ - private int transactionTimeout; + private Integer transactionTimeout; /** * Specifies whether to test the connection on startup. This ensures that * when Camel starts that all the JMS consumers have a valid connection to @@ -535,7 +535,7 @@ public class JmsComponentConfiguration { * the actual correlation id when doing request/reply over JMS and when the * option useMessageIDAsCorrelationID is enabled. */ - private int waitForProvisionCorrelationToBeUpdatedCounter; + private Integer waitForProvisionCorrelationToBeUpdatedCounter; /** * Interval in millis to sleep each time while waiting for provisional * correlation id to be updated. @@ -567,11 +567,11 @@ public class JmsComponentConfiguration { this.allowReplyManagerQuickStop = allowReplyManagerQuickStop; } - public int getAcknowledgementMode() { + public Integer getAcknowledgementMode() { return acknowledgementMode; } - public void setAcknowledgementMode(int acknowledgementMode) { + public void setAcknowledgementMode(Integer acknowledgementMode) { this.acknowledgementMode = acknowledgementMode; } @@ -599,11 +599,11 @@ public class JmsComponentConfiguration { this.autoStartup = autoStartup; } - public int getCacheLevel() { + public Integer getCacheLevel() { return cacheLevel; } - public void setCacheLevel(int cacheLevel) { + public void setCacheLevel(Integer cacheLevel) { this.cacheLevel = cacheLevel; } @@ -631,19 +631,19 @@ public class JmsComponentConfiguration { this.clientId = clientId; } - public int getConcurrentConsumers() { + public Integer getConcurrentConsumers() { return concurrentConsumers; } - public void setConcurrentConsumers(int concurrentConsumers) { + public void setConcurrentConsumers(Integer concurrentConsumers) { this.concurrentConsumers = concurrentConsumers; } - public int getReplyToConcurrentConsumers() { + public Integer getReplyToConcurrentConsumers() { return replyToConcurrentConsumers; } - public void setReplyToConcurrentConsumers(int replyToConcurrentConsumers) { + public void setReplyToConcurrentConsumers(Integer replyToConcurrentConsumers) { this.replyToConcurrentConsumers = replyToConcurrentConsumers; } @@ -744,53 +744,53 @@ public class JmsComponentConfiguration { this.exposeListenerSession = exposeListenerSession; } - public int getIdleTaskExecutionLimit() { + public Integer getIdleTaskExecutionLimit() { return idleTaskExecutionLimit; } - public void setIdleTaskExecutionLimit(int idleTaskExecutionLimit) { + public void setIdleTaskExecutionLimit(Integer idleTaskExecutionLimit) { this.idleTaskExecutionLimit = idleTaskExecutionLimit; } - public int getIdleConsumerLimit() { + public Integer getIdleConsumerLimit() { return idleConsumerLimit; } - public void setIdleConsumerLimit(int idleConsumerLimit) { + public void setIdleConsumerLimit(Integer idleConsumerLimit) { this.idleConsumerLimit = idleConsumerLimit; } - public int getMaxConcurrentConsumers() { + public Integer getMaxConcurrentConsumers() { return maxConcurrentConsumers; } - public void setMaxConcurrentConsumers(int maxConcurrentConsumers) { + public void setMaxConcurrentConsumers(Integer maxConcurrentConsumers) { this.maxConcurrentConsumers = maxConcurrentConsumers; } - public int getReplyToMaxConcurrentConsumers() { + public Integer getReplyToMaxConcurrentConsumers() { return replyToMaxConcurrentConsumers; } public void setReplyToMaxConcurrentConsumers( - int replyToMaxConcurrentConsumers) { + Integer replyToMaxConcurrentConsumers) { this.replyToMaxConcurrentConsumers = replyToMaxConcurrentConsumers; } - public int getReplyOnTimeoutToMaxConcurrentConsumers() { + public Integer getReplyOnTimeoutToMaxConcurrentConsumers() { return replyOnTimeoutToMaxConcurrentConsumers; } public void setReplyOnTimeoutToMaxConcurrentConsumers( - int replyOnTimeoutToMaxConcurrentConsumers) { + Integer replyOnTimeoutToMaxConcurrentConsumers) { this.replyOnTimeoutToMaxConcurrentConsumers = replyOnTimeoutToMaxConcurrentConsumers; } - public int getMaxMessagesPerTask() { + public Integer getMaxMessagesPerTask() { return maxMessagesPerTask; } - public void setMaxMessagesPerTask(int maxMessagesPerTask) { + public void setMaxMessagesPerTask(Integer maxMessagesPerTask) { this.maxMessagesPerTask = maxMessagesPerTask; } @@ -843,11 +843,11 @@ public class JmsComponentConfiguration { this.useMessageIDAsCorrelationID = useMessageIDAsCorrelationID; } - public int getPriority() { + public Integer getPriority() { return priority; } - public void setPriority(int priority) { + public void setPriority(Integer priority) { this.priority = priority; } @@ -936,11 +936,11 @@ public class JmsComponentConfiguration { this.transactionName = transactionName; } - public int getTransactionTimeout() { + public Integer getTransactionTimeout() { return transactionTimeout; } - public void setTransactionTimeout(int transactionTimeout) { + public void setTransactionTimeout(Integer transactionTimeout) { this.transactionTimeout = transactionTimeout; } @@ -1133,12 +1133,12 @@ public class JmsComponentConfiguration { this.messageCreatedStrategy = messageCreatedStrategy; } - public int getWaitForProvisionCorrelationToBeUpdatedCounter() { + public Integer getWaitForProvisionCorrelationToBeUpdatedCounter() { return waitForProvisionCorrelationToBeUpdatedCounter; } public void setWaitForProvisionCorrelationToBeUpdatedCounter( - int waitForProvisionCorrelationToBeUpdatedCounter) { + Integer waitForProvisionCorrelationToBeUpdatedCounter) { this.waitForProvisionCorrelationToBeUpdatedCounter = waitForProvisionCorrelationToBeUpdatedCounter; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java index 90e022a..2fa39a16 100644 --- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java +++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/springboot/NettyHttpComponentConfiguration.java @@ -54,7 +54,7 @@ public class NettyHttpComponentConfiguration { * The core pool size for the ordered thread pool if its in use. The default * value is 16. */ - private int maximumPoolSize; + private Integer maximumPoolSize; public NettyHttpBinding getNettyHttpBinding() { return nettyHttpBinding; @@ -90,11 +90,11 @@ public class NettyHttpComponentConfiguration { this.configuration = configuration; } - public int getMaximumPoolSize() { + public Integer getMaximumPoolSize() { return maximumPoolSize; } - public void setMaximumPoolSize(int maximumPoolSize) { + public void setMaximumPoolSize(Integer maximumPoolSize) { this.maximumPoolSize = maximumPoolSize; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java b/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java index f958387..afcd6ad 100644 --- a/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java +++ b/components/camel-netty/src/main/java/org/apache/camel/component/netty/springboot/NettyComponentConfiguration.java @@ -35,7 +35,7 @@ public class NettyComponentConfiguration { * The core pool size for the ordered thread pool if its in use. The default * value is 16. */ - private int maximumPoolSize; + private Integer maximumPoolSize; public NettyConfiguration getConfiguration() { return configuration; @@ -45,11 +45,11 @@ public class NettyComponentConfiguration { this.configuration = configuration; } - public int getMaximumPoolSize() { + public Integer getMaximumPoolSize() { return maximumPoolSize; } - public void setMaximumPoolSize(int maximumPoolSize) { + public void setMaximumPoolSize(Integer maximumPoolSize) { this.maximumPoolSize = maximumPoolSize; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java index 31c80d0..e1a21a2 100644 --- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java +++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/springboot/NettyHttpComponentConfiguration.java @@ -51,7 +51,7 @@ public class NettyHttpComponentConfiguration { * The thread pool size for the EventExecutorGroup if its in use. The * default value is 16. */ - private int maximumPoolSize; + private Integer maximumPoolSize; /** * To use the NettyConfiguration as configuration when creating endpoints. */ @@ -87,11 +87,11 @@ public class NettyHttpComponentConfiguration { this.securityConfiguration = securityConfiguration; } - public int getMaximumPoolSize() { + public Integer getMaximumPoolSize() { return maximumPoolSize; } - public void setMaximumPoolSize(int maximumPoolSize) { + public void setMaximumPoolSize(Integer maximumPoolSize) { this.maximumPoolSize = maximumPoolSize; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java index e29ea13..7bedf0d 100644 --- a/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java +++ b/components/camel-netty4/src/main/java/org/apache/camel/component/netty4/springboot/NettyComponentConfiguration.java @@ -32,7 +32,7 @@ public class NettyComponentConfiguration { * The thread pool size for the EventExecutorGroup if its in use. The * default value is 16. */ - private int maximumPoolSize; + private Integer maximumPoolSize; /** * To use the NettyConfiguration as configuration when creating endpoints. */ @@ -42,11 +42,11 @@ public class NettyComponentConfiguration { */ private EventExecutorGroup executorService; - public int getMaximumPoolSize() { + public Integer getMaximumPoolSize() { return maximumPoolSize; } - public void setMaximumPoolSize(int maximumPoolSize) { + public void setMaximumPoolSize(Integer maximumPoolSize) { this.maximumPoolSize = maximumPoolSize; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java index 5c63e34..bc94ab5 100644 --- a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java +++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/springboot/QuartzComponentConfiguration.java @@ -49,7 +49,7 @@ public class QuartzComponentConfiguration { /** * Seconds to wait before starting the quartz scheduler. */ - private int startDelayedSeconds; + private Integer startDelayedSeconds; /** * Whether or not the scheduler should be auto started. This options is * default true @@ -93,11 +93,11 @@ public class QuartzComponentConfiguration { this.propertiesFile = propertiesFile; } - public int getStartDelayedSeconds() { + public Integer getStartDelayedSeconds() { return startDelayedSeconds; } - public void setStartDelayedSeconds(int startDelayedSeconds) { + public void setStartDelayedSeconds(Integer startDelayedSeconds) { this.startDelayedSeconds = startDelayedSeconds; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentConfiguration.java b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentConfiguration.java index 3f37ca4..1b0eea6 100644 --- a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentConfiguration.java +++ b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/springboot/QuartzComponentConfiguration.java @@ -37,7 +37,7 @@ public class QuartzComponentConfiguration { /** * Seconds to wait before starting the quartz scheduler. */ - private int startDelayedSeconds; + private Integer startDelayedSeconds; /** * Whether to prefix the quartz job with the endpoint id. This option is * default false. @@ -82,11 +82,11 @@ public class QuartzComponentConfiguration { this.autoStartScheduler = autoStartScheduler; } - public int getStartDelayedSeconds() { + public Integer getStartDelayedSeconds() { return startDelayedSeconds; } - public void setStartDelayedSeconds(int startDelayedSeconds) { + public void setStartDelayedSeconds(Integer startDelayedSeconds) { this.startDelayedSeconds = startDelayedSeconds; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentConfiguration.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentConfiguration.java index 86d8770..8824e48 100644 --- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentConfiguration.java +++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/springboot/RestletComponentConfiguration.java @@ -115,7 +115,7 @@ public class RestletComponentConfiguration { * To configure the port number for the restlet consumer routes. This allows * to configure this once to reuse the same port for these consumers. */ - private int port; + private Integer port; /** * Whether to use synchronous Restlet Client for the producer. Setting this * option to true can yield faster performance as it seems the Restlet @@ -261,11 +261,11 @@ public class RestletComponentConfiguration { this.disableStreamCache = disableStreamCache; } - public int getPort() { + public Integer getPort() { return port; } - public void setPort(int port) { + public void setPort(Integer port) { this.port = port; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/springboot/SparkComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/springboot/SparkComponentConfiguration.java b/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/springboot/SparkComponentConfiguration.java index 1791ce1..be99251 100644 --- a/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/springboot/SparkComponentConfiguration.java +++ b/components/camel-spark-rest/src/main/java/org/apache/camel/component/sparkrest/springboot/SparkComponentConfiguration.java @@ -32,7 +32,7 @@ public class SparkComponentConfiguration { /** * Port number. Will by default use 4567 */ - private int port; + private Integer port; /** * Set the IP address that Spark should listen on. If not called the default * address is '0.0.0.0'. @@ -41,16 +41,16 @@ public class SparkComponentConfiguration { /** * Minimum number of threads in Spark thread-pool (shared globally) */ - private int minThreads; + private Integer minThreads; /** * Maximum number of threads in Spark thread-pool (shared globally) */ - private int maxThreads; + private Integer maxThreads; /** * Thread idle timeout in millis where threads that has been idle for a * longer period will be terminated from the thread pool */ - private int timeOutMillis; + private Integer timeOutMillis; /** * Configures connection to be secure to use the keystore file */ @@ -76,11 +76,11 @@ public class SparkComponentConfiguration { */ private SparkBinding sparkBinding; - public int getPort() { + public Integer getPort() { return port; } - public void setPort(int port) { + public void setPort(Integer port) { this.port = port; } @@ -92,27 +92,27 @@ public class SparkComponentConfiguration { this.ipAddress = ipAddress; } - public int getMinThreads() { + public Integer getMinThreads() { return minThreads; } - public void setMinThreads(int minThreads) { + public void setMinThreads(Integer minThreads) { this.minThreads = minThreads; } - public int getMaxThreads() { + public Integer getMaxThreads() { return maxThreads; } - public void setMaxThreads(int maxThreads) { + public void setMaxThreads(Integer maxThreads) { this.maxThreads = maxThreads; } - public int getTimeOutMillis() { + public Integer getTimeOutMillis() { return timeOutMillis; } - public void setTimeOutMillis(int timeOutMillis) { + public void setTimeOutMillis(Integer timeOutMillis) { this.timeOutMillis = timeOutMillis; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java index b50dfc4..7d2813a 100644 --- a/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java +++ b/components/camel-ssh/src/main/java/org/apache/camel/component/ssh/springboot/SshComponentConfiguration.java @@ -41,7 +41,7 @@ public class SshComponentConfiguration { /** * Sets the port number for the remote SSH server. */ - private int port; + private Integer port; /** * Sets the username to use in logging into the remote SSH server. */ @@ -102,11 +102,11 @@ public class SshComponentConfiguration { this.host = host; } - public int getPort() { + public Integer getPort() { return port; } - public void setPort(int port) { + public void setPort(Integer port) { this.port = port; } http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentConfiguration.java b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentConfiguration.java index 8ce5105..114bc76 100644 --- a/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentConfiguration.java +++ b/components/camel-twitter/src/main/java/org/apache/camel/component/twitter/springboot/TwitterComponentConfiguration.java @@ -58,7 +58,7 @@ public class TwitterComponentConfiguration { /** * The http proxy port which can be used for the camel-twitter. */ - private int httpProxyPort; + private Integer httpProxyPort; public String getAccessToken() { return accessToken; @@ -116,11 +116,11 @@ public class TwitterComponentConfiguration { this.httpProxyPassword = httpProxyPassword; } - public int getHttpProxyPort() { + public Integer getHttpProxyPort() { return httpProxyPort; } - public void setHttpProxyPort(int httpProxyPort) { + public void setHttpProxyPort(Integer httpProxyPort) { this.httpProxyPort = httpProxyPort; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java b/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java index 1cd228b..74d8d91 100644 --- a/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java +++ b/components/camel-vertx/src/main/java/org/apache/camel/component/vertx/springboot/VertxComponentConfiguration.java @@ -41,7 +41,7 @@ public class VertxComponentConfiguration { /** * Port for creating an embedded clustered EventBus */ - private int port; + private Integer port; /** * Options to use for creating vertx */ @@ -55,7 +55,7 @@ public class VertxComponentConfiguration { * Timeout in seconds to wait for clustered Vertx EventBus to be ready. The * default value is 60. */ - private int timeout; + private Integer timeout; public VertxFactory getVertxFactory() { return vertxFactory; @@ -73,11 +73,11 @@ public class VertxComponentConfiguration { this.host = host; } - public int getPort() { + public Integer getPort() { return port; } - public void setPort(int port) { + public void setPort(Integer port) { this.port = port; } @@ -97,11 +97,11 @@ public class VertxComponentConfiguration { this.vertx = vertx; } - public int getTimeout() { + public Integer getTimeout() { return timeout; } - public void setTimeout(int timeout) { + public void setTimeout(Integer timeout) { this.timeout = timeout; } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/d79e9f62/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java ---------------------------------------------------------------------- diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java index 4a299b7..bea7101 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpringBootAutoConfigurationMojo.java @@ -156,10 +156,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo { createComponentAutoConfigurationSource(pkg, model, aliases); createComponentSpringFactorySource(pkg, model); } - - } - } } @@ -209,9 +206,7 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo { createDataFormatAutoConfigurationSource(pkg, model, aliases); createDataFormatSpringFactorySource(pkg, model); } - } - } } @@ -238,9 +233,19 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo { // remove <?> as generic type as Roaster (Eclipse JDT) cannot use that String type = option.getJavaType(); type = type.replaceAll("\\<\\?\\>", ""); - // favor using Boolean types over boolean with Spring Boot + // use wrapper types for primitive types so a null mean that the option has not been configured if ("boolean".equals(type)) { type = "java.lang.Boolean"; + } else if ("int".equals(type) || "integer".equals(type)) { + type = "java.lang.Integer"; + } else if ("byte".equals(type)) { + type = "java.lang.Byte"; + } else if ("short".equals(type)) { + type = "java.lang.Short"; + } else if ("double".equals(type)) { + type = "java.lang.Double"; + } else if ("float".equals(type)) { + type = "java.lang.Float"; } PropertySource<JavaClassSource> prop = javaClass.addProperty(type, option.getName()); @@ -323,9 +328,19 @@ public class SpringBootAutoConfigurationMojo extends AbstractMojo { // remove <?> as generic type as Roaster (Eclipse JDT) cannot use that String type = option.getJavaType(); type = type.replaceAll("\\<\\?\\>", ""); - // favor using Boolean types over boolean with Spring Boot + // use wrapper types for primitive types so a null mean that the option has not been configured if ("boolean".equals(type)) { type = "java.lang.Boolean"; + } else if ("int".equals(type) || "integer".equals(type)) { + type = "java.lang.Integer"; + } else if ("byte".equals(type)) { + type = "java.lang.Byte"; + } else if ("short".equals(type)) { + type = "java.lang.Short"; + } else if ("double".equals(type)) { + type = "java.lang.Double"; + } else if ("float".equals(type)) { + type = "java.lang.Float"; } PropertySource<JavaClassSource> prop = javaClass.addProperty(type, option.getName());
