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 2024/06/10 12:47:23 UTC

(camel) branch CAMEL-20798-SES created (now 81223822950)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch CAMEL-20798-SES
in repository https://gitbox.apache.org/repos/asf/camel.git


      at 81223822950 CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS SES

This branch includes the following new commits:

     new 6731a42b060 CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS SES
     new 81223822950 CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS SES

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(camel) 01/02: CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS SES

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch CAMEL-20798-SES
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6731a42b0606e40012416ad5bc2170b186ede791
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 10 11:08:16 2024 +0200

    CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS SES
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../org/apache/camel/catalog/others.properties     |  1 -
 .../camel/catalog/others/openapi-validator.json    | 15 ---------------
 .../camel/component/aws2/ses/Ses2Endpoint.java     | 22 +++++++++++++++++++++-
 3 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
index 15e1b4bcb33..9b64a3dd84a 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties
@@ -35,7 +35,6 @@ microprofile-fault-tolerance
 microprofile-health
 observation
 openapi-java
-openapi-validator
 opentelemetry
 platform-http-jolokia
 platform-http-main
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/openapi-validator.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/openapi-validator.json
deleted file mode 100644
index 4439b1cdd95..00000000000
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/openapi-validator.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
-  "other": {
-    "kind": "other",
-    "name": "openapi-validator",
-    "title": "Openapi Validator",
-    "description": "OpenAPI validator for Camel Rest DSL",
-    "deprecated": false,
-    "firstVersion": "4.7.0",
-    "label": "rest,api",
-    "supportLevel": "Preview",
-    "groupId": "org.apache.camel",
-    "artifactId": "camel-openapi-validator",
-    "version": "4.7.0-SNAPSHOT"
-  }
-}
diff --git a/components/camel-aws/camel-aws2-ses/src/main/java/org/apache/camel/component/aws2/ses/Ses2Endpoint.java b/components/camel-aws/camel-aws2-ses/src/main/java/org/apache/camel/component/aws2/ses/Ses2Endpoint.java
index ae0229fff1f..322d15ac967 100644
--- a/components/camel-aws/camel-aws2-ses/src/main/java/org/apache/camel/component/aws2/ses/Ses2Endpoint.java
+++ b/components/camel-aws/camel-aws2-ses/src/main/java/org/apache/camel/component/aws2/ses/Ses2Endpoint.java
@@ -22,18 +22,21 @@ import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.component.aws2.ses.client.Ses2ClientFactory;
+import org.apache.camel.spi.EndpointServiceLocation;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.support.DefaultEndpoint;
 import org.apache.camel.util.ObjectHelper;
 import software.amazon.awssdk.services.ses.SesClient;
 
+import java.util.Map;
+
 /**
  * Send e-mails through AWS SES service.
  */
 @UriEndpoint(firstVersion = "3.1.0", scheme = "aws2-ses", title = "AWS Simple Email Service (SES)", syntax = "aws2-ses:from",
              producerOnly = true, category = { Category.CLOUD, Category.MAIL }, headersClass = Ses2Constants.class)
-public class Ses2Endpoint extends DefaultEndpoint {
+public class Ses2Endpoint extends DefaultEndpoint implements EndpointServiceLocation {
 
     private SesClient sesClient;
 
@@ -85,4 +88,21 @@ public class Ses2Endpoint extends DefaultEndpoint {
     public SesClient getSESClient() {
         return sesClient;
     }
+
+    @Override
+    public String getServiceUrl() {
+        if (!configuration.isOverrideEndpoint()) {
+            if (ObjectHelper.isNotEmpty(configuration.getRegion())) {
+                return configuration.getRegion();
+            }
+        } else if (ObjectHelper.isNotEmpty(configuration.getUriEndpointOverride())) {
+            return configuration.getUriEndpointOverride();
+        }
+        return null;
+    }
+
+    @Override
+    public String getServiceProtocol() {
+        return "ses";
+    }
 }


(camel) 02/02: CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS SES

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch CAMEL-20798-SES
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 812238229500b501da08590daaa8307e7326e534
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 10 11:20:21 2024 +0200

    CAMEL-20798: EndpointServiceLocation on components to make it possible to know which remote system Camel connects to to assist for monitoring and observability - AWS SES
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../src/main/java/org/apache/camel/component/aws2/ses/Ses2Endpoint.java | 2 --
 1 file changed, 2 deletions(-)

diff --git a/components/camel-aws/camel-aws2-ses/src/main/java/org/apache/camel/component/aws2/ses/Ses2Endpoint.java b/components/camel-aws/camel-aws2-ses/src/main/java/org/apache/camel/component/aws2/ses/Ses2Endpoint.java
index 322d15ac967..c8857fbde77 100644
--- a/components/camel-aws/camel-aws2-ses/src/main/java/org/apache/camel/component/aws2/ses/Ses2Endpoint.java
+++ b/components/camel-aws/camel-aws2-ses/src/main/java/org/apache/camel/component/aws2/ses/Ses2Endpoint.java
@@ -29,8 +29,6 @@ import org.apache.camel.support.DefaultEndpoint;
 import org.apache.camel.util.ObjectHelper;
 import software.amazon.awssdk.services.ses.SesClient;
 
-import java.util.Map;
-
 /**
  * Send e-mails through AWS SES service.
  */