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/02/07 09:44:58 UTC
[camel] 01/10: CAMEL-12234 - Camel-AWS: Since we are using builders,
we need to remove the AWS endpoint options on the components that are using
them - AWS CW
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 0b5c5b80569e2b8943b11762909517b0fa7b7938
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Feb 7 09:38:14 2018 +0100
CAMEL-12234 - Camel-AWS: Since we are using builders, we need to remove the AWS endpoint options on the components that are using them - AWS CW
---
components/camel-aws/src/main/docs/aws-cw-component.adoc | 5 ++---
.../org/apache/camel/component/aws/cw/CwConfiguration.java | 14 --------------
.../java/org/apache/camel/component/aws/cw/CwEndpoint.java | 5 ++---
.../aws/cw/springboot/CwComponentConfiguration.java | 12 ------------
4 files changed, 4 insertions(+), 32 deletions(-)
diff --git a/components/camel-aws/src/main/docs/aws-cw-component.adoc b/components/camel-aws/src/main/docs/aws-cw-component.adoc
index 8f4daea..32a3880 100644
--- a/components/camel-aws/src/main/docs/aws-cw-component.adoc
+++ b/components/camel-aws/src/main/docs/aws-cw-component.adoc
@@ -64,13 +64,12 @@ with the following path and query parameters:
| *namespace* | *Required* The metric namespace | | String
|===
-==== Query Parameters (12 parameters):
+==== Query Parameters (11 parameters):
[width="100%",cols="2,5,^1,2",options="header"]
|===
| Name | Description | Default | Type
| *amazonCwClient* (producer) | To use the AmazonCloudWatch as the client | | AmazonCloudWatch
-| *amazonCwEndpoint* (producer) | The endpoint with which the AWS-CW client wants to work with. | | String
| *name* (producer) | The metric name | | String
| *proxyHost* (producer) | To define a proxy host when instantiating the CW client | | String
| *proxyPort* (producer) | To define a proxy port when instantiating the CW client | | Integer
@@ -171,4 +170,4 @@ where `${camel-version`} must be replaced by the actual version of Camel
* link:endpoint.html[Endpoint]
* link:getting-started.html[Getting Started]
-* link:aws.html[AWS Component]
\ No newline at end of file
+* link:aws.html[AWS Component]
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwConfiguration.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwConfiguration.java
index 2d34014..a802422 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwConfiguration.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwConfiguration.java
@@ -33,8 +33,6 @@ public class CwConfiguration implements Cloneable {
private String namespace;
@UriParam
private AmazonCloudWatch amazonCwClient;
- @UriParam
- private String amazonCwEndpoint;
@UriParam(label = "security", secret = true)
private String accessKey;
@UriParam(label = "security", secret = true)
@@ -53,18 +51,6 @@ public class CwConfiguration implements Cloneable {
private Integer proxyPort;
@UriParam
private String region;
-
-
- /**
- * The endpoint with which the AWS-CW client wants to work with.
- */
- public void setAmazonCwEndpoint(String amazonCwEndpoint) {
- this.amazonCwEndpoint = amazonCwEndpoint;
- }
-
- public String getAmazonCwEndpoint() {
- return amazonCwEndpoint;
- }
public String getAccessKey() {
return accessKey;
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java
index c462216..d947182 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/cw/CwEndpoint.java
@@ -118,9 +118,8 @@ public class CwEndpoint extends DefaultEndpoint {
clientBuilder = AmazonCloudWatchClientBuilder.standard().withClientConfiguration(clientConfiguration);
}
}
- if (ObjectHelper.isNotEmpty(configuration.getAmazonCwEndpoint()) && ObjectHelper.isNotEmpty(configuration.getRegion())) {
- EndpointConfiguration endpointConfiguration = new EndpointConfiguration(configuration.getAmazonCwEndpoint(), configuration.getRegion());
- clientBuilder = clientBuilder.withEndpointConfiguration(endpointConfiguration);
+ if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+ clientBuilder = clientBuilder.withRegion(Regions.valueOf(configuration.getRegion()));
}
client = clientBuilder.build();
return client;
diff --git a/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/cw/springboot/CwComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/cw/springboot/CwComponentConfiguration.java
index f4b7887..fdeea0b 100644
--- a/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/cw/springboot/CwComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-aws-starter/src/main/java/org/apache/camel/component/aws/cw/springboot/CwComponentConfiguration.java
@@ -101,10 +101,6 @@ public class CwComponentConfiguration
public static class CwConfigurationNestedConfiguration {
public static final Class CAMEL_NESTED_CLASS = org.apache.camel.component.aws.cw.CwConfiguration.class;
/**
- * The endpoint with which the AWS-CW client wants to work with.
- */
- private String amazonCwEndpoint;
- /**
* Amazon AWS Access Key
*/
private String accessKey;
@@ -140,14 +136,6 @@ public class CwComponentConfiguration
private Integer proxyPort;
private String region;
- public String getAmazonCwEndpoint() {
- return amazonCwEndpoint;
- }
-
- public void setAmazonCwEndpoint(String amazonCwEndpoint) {
- this.amazonCwEndpoint = amazonCwEndpoint;
- }
-
public String getAccessKey() {
return accessKey;
}
--
To stop receiving notification emails like this one, please contact
acosentino@apache.org.