You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/01/29 09:29:52 UTC
[camel] 02/02: CAMEL-12190 - Camel-AWS S3: Add a parameter to
specify chunkedEncodingDisabled option - change name to the option,
regen docs
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 2b2e96443cff58514592527edd89aca8045cd37f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jan 29 10:26:21 2018 +0100
CAMEL-12190 - Camel-AWS S3: Add a parameter to specify chunkedEncodingDisabled option - change name to the option, regen docs
---
components/camel-aws/src/main/docs/aws-s3-component.adoc | 2 +-
.../org/apache/camel/component/aws/s3/S3Configuration.java | 12 ++++++------
.../java/org/apache/camel/component/aws/s3/S3Endpoint.java | 8 ++++----
.../camel/component/aws/s3/S3ComponentConfigurationTest.java | 4 ++--
.../aws/s3/springboot/S3ComponentConfiguration.java | 10 +++++-----
5 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/components/camel-aws/src/main/docs/aws-s3-component.adoc b/components/camel-aws/src/main/docs/aws-s3-component.adoc
index 5fa0b09..2aa8853 100644
--- a/components/camel-aws/src/main/docs/aws-s3-component.adoc
+++ b/components/camel-aws/src/main/docs/aws-s3-component.adoc
@@ -112,7 +112,7 @@ with the following path and query parameters:
| *awsKMSKeyId* (producer) | Define the id of KMS key to use in case KMS is enabled | | String
| *useAwsKMS* (producer) | Define if KMS must be used or not | false | boolean
| *synchronous* (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
-| *chunkedEncodingDisabled* ( advanced) | Define if disabled Chunked Encoding is true or false | false | boolean
+| *chunkedEncodingEnabled* ( advanced) | Define if disabled Chunked Encoding is true or false | false | boolean
| *backoffErrorThreshold* (scheduler) | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. | | int
| *backoffIdleThreshold* (scheduler) | The number of subsequent idle polls that should happen before the backoffMultipler should kick-in. | | int
| *backoffMultiplier* (scheduler) | To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured. | | int
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
index 3217e62..2359444 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Configuration.java
@@ -73,7 +73,7 @@ public class S3Configuration implements Cloneable {
@UriParam(label = "common,advanced", defaultValue = "false")
private boolean useEncryption;
@UriParam(label = "common, advanced", defaultValue = "false")
- private boolean chunkedEncodingDisabled;
+ private boolean chunkedEncodingEnabled;
@UriParam(label = "producer,advanced", defaultValue = "false")
private boolean useAwsKMS;
@UriParam(label = "producer,advanced")
@@ -384,17 +384,17 @@ public class S3Configuration implements Cloneable {
this.awsKMSKeyId = awsKMSKeyId;
}
- public boolean isChunkedEncodingDisabled() {
- return chunkedEncodingDisabled;
+ public boolean isChunkedEncodingEnabled() {
+ return chunkedEncodingEnabled;
}
/**
* Define if disabled Chunked Encoding is true or false
*/
- public void setChunkedEncodingDisabled(boolean chunkedEncodingDisabled) {
- this.chunkedEncodingDisabled = chunkedEncodingDisabled;
+ public void setChunkedEncodingEnabled(boolean chunkedEncodingEnabled) {
+ this.chunkedEncodingEnabled = chunkedEncodingEnabled;
}
-
+
boolean hasProxyConfiguration() {
return ObjectHelper.isNotEmpty(getProxyHost()) && ObjectHelper.isNotEmpty(getProxyPort());
}
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
index 5209456..988d63d 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Endpoint.java
@@ -262,14 +262,14 @@ public class S3Endpoint extends ScheduledPollEndpoint {
clientBuilder = clientBuilder.withRegion(Regions.valueOf(configuration.getRegion()));
}
clientBuilder = clientBuilder.withPathStyleAccessEnabled(configuration.isPathStyleAccess());
- clientBuilder = clientBuilder.withChunkedEncodingDisabled(configuration.isChunkedEncodingDisabled());
+ clientBuilder = clientBuilder.withChunkedEncodingDisabled(configuration.isChunkedEncodingEnabled());
client = clientBuilder.build();
} else {
if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
encClientBuilder = encClientBuilder.withRegion(Regions.valueOf(configuration.getRegion()));
}
encClientBuilder = encClientBuilder.withPathStyleAccessEnabled(configuration.isPathStyleAccess());
- encClientBuilder = encClientBuilder.withChunkedEncodingDisabled(configuration.isChunkedEncodingDisabled());
+ encClientBuilder = encClientBuilder.withChunkedEncodingDisabled(configuration.isChunkedEncodingEnabled());
client = encClientBuilder.build();
}
} else {
@@ -286,14 +286,14 @@ public class S3Endpoint extends ScheduledPollEndpoint {
clientBuilder = clientBuilder.withRegion(Regions.valueOf(configuration.getRegion()));
}
clientBuilder = clientBuilder.withPathStyleAccessEnabled(configuration.isPathStyleAccess());
- clientBuilder = clientBuilder.withChunkedEncodingDisabled(configuration.isChunkedEncodingDisabled());
+ clientBuilder = clientBuilder.withChunkedEncodingDisabled(configuration.isChunkedEncodingEnabled());
client = clientBuilder.build();
} else {
if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
encClientBuilder = encClientBuilder.withRegion(Regions.valueOf(configuration.getRegion()));
}
encClientBuilder = encClientBuilder.withPathStyleAccessEnabled(configuration.isPathStyleAccess());
- encClientBuilder = encClientBuilder.withChunkedEncodingDisabled(configuration.isChunkedEncodingDisabled());
+ encClientBuilder = encClientBuilder.withChunkedEncodingDisabled(configuration.isChunkedEncodingEnabled());
client = encClientBuilder.build();
}
}
diff --git a/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentConfigurationTest.java b/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentConfigurationTest.java
index 17a33f9..7008b2c 100644
--- a/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentConfigurationTest.java
+++ b/components/camel-aws/src/test/java/org/apache/camel/component/aws/s3/S3ComponentConfigurationTest.java
@@ -176,12 +176,12 @@ public class S3ComponentConfigurationTest extends CamelTestSupport {
public void createEndpointWithChunkedEncoding() throws Exception {
S3Component component = new S3Component(context);
- S3Endpoint endpoint = (S3Endpoint) component.createEndpoint("aws-s3://MyBucket?chunkedEncodingDisabled=true&accessKey=xxx&secretKey=yyy®ion=US_WEST_1");
+ S3Endpoint endpoint = (S3Endpoint) component.createEndpoint("aws-s3://MyBucket?chunkedEncodingEnabled=true&accessKey=xxx&secretKey=yyy®ion=US_WEST_1");
assertEquals("MyBucket", endpoint.getConfiguration().getBucketName());
assertEquals("xxx", endpoint.getConfiguration().getAccessKey());
assertEquals("yyy", endpoint.getConfiguration().getSecretKey());
- assertTrue(endpoint.getConfiguration().isChunkedEncodingDisabled());
+ assertTrue(endpoint.getConfiguration().isChunkedEncodingEnabled());
}
@Test
diff --git a/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/s3/springboot/S3ComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/s3/springboot/S3ComponentConfiguration.java
index c19c0f6..d53fa43 100644
--- a/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/s3/springboot/S3ComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/s3/springboot/S3ComponentConfiguration.java
@@ -238,7 +238,7 @@ public class S3ComponentConfiguration
/**
* Define if disabled Chunked Encoding is true or false
*/
- private Boolean chunkedEncodingDisabled = false;
+ private Boolean chunkedEncodingEnabled = false;
public Long getPartSize() {
return partSize;
@@ -441,12 +441,12 @@ public class S3ComponentConfiguration
this.awsKMSKeyId = awsKMSKeyId;
}
- public Boolean getChunkedEncodingDisabled() {
- return chunkedEncodingDisabled;
+ public Boolean getChunkedEncodingEnabled() {
+ return chunkedEncodingEnabled;
}
- public void setChunkedEncodingDisabled(Boolean chunkedEncodingDisabled) {
- this.chunkedEncodingDisabled = chunkedEncodingDisabled;
+ public void setChunkedEncodingEnabled(Boolean chunkedEncodingEnabled) {
+ this.chunkedEncodingEnabled = chunkedEncodingEnabled;
}
}
}
\ No newline at end of file
--
To stop receiving notification emails like this one, please contact
acosentino@apache.org.