This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 22dbedf8af7 CAMEL-20798: EndpointServiceLocation on components to make
it possible to know which remote system Camel connects to to assist for
monitoring and observability
22dbedf8af7 is described below
commit 22dbedf8af78c3ba011f8d3e097f4e1c445ba789
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed May 29 12:20:57 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
---
.../services/org/apache/camel/dev-consoles.properties | 7 -------
.../java/org/apache/camel/component/mina/MinaEndpoint.java | 13 ++++++++++++-
.../services/org/apache/camel/dev-consoles.properties | 7 -------
.../services/org/apache/camel/dev-consoles.properties | 7 -------
4 files changed, 12 insertions(+), 22 deletions(-)
diff --git
a/components/camel-mina/src/generated/resources/META-INF/services/org/apache/camel/dev-consoles.properties
b/components/camel-mina/src/generated/resources/META-INF/services/org/apache/camel/dev-consoles.properties
deleted file mode 100644
index 91572920ab2..00000000000
---
a/components/camel-mina/src/generated/resources/META-INF/services/org/apache/camel/dev-consoles.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-dev-consoles=mina
-groupId=org.apache.camel
-artifactId=camel-mina
-version=4.7.0-SNAPSHOT
-projectName=Camel :: MINA
-projectDescription=Camel MINA support
diff --git
a/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java
b/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java
index e071358843e..8290fd59380 100644
---
a/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java
+++
b/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java
@@ -22,6 +22,7 @@ import org.apache.camel.Consumer;
import org.apache.camel.MultipleConsumersSupport;
import org.apache.camel.Processor;
import org.apache.camel.Producer;
+import org.apache.camel.spi.EndpointServiceLocation;
import org.apache.camel.spi.UriEndpoint;
import org.apache.camel.spi.UriParam;
import org.apache.camel.support.DefaultEndpoint;
@@ -32,7 +33,7 @@ import org.apache.camel.util.ObjectHelper;
*/
@UriEndpoint(firstVersion = "2.10.0", scheme = "mina", title = "Mina", syntax
= "mina:protocol:host:port",
category = { Category.NETWORKING }, headersClass =
MinaConstants.class)
-public class MinaEndpoint extends DefaultEndpoint implements
MultipleConsumersSupport {
+public class MinaEndpoint extends DefaultEndpoint implements
MultipleConsumersSupport, EndpointServiceLocation {
@UriParam
private MinaConfiguration configuration;
@@ -45,6 +46,16 @@ public class MinaEndpoint extends DefaultEndpoint implements
MultipleConsumersSu
this.configuration = configuration;
}
+ @Override
+ public String getServiceUrl() {
+ return configuration.getProtocol() + ":" + configuration.getHost() +
":" + configuration.getPort();
+ }
+
+ @Override
+ public String getServiceProtocol() {
+ return configuration.getProtocol();
+ }
+
@Override
public boolean isSingletonProducer() {
// the producer should not be singleton otherwise cannot use
concurrent producers and safely
diff --git
a/components/camel-mllp/src/generated/resources/META-INF/services/org/apache/camel/dev-consoles.properties
b/components/camel-mllp/src/generated/resources/META-INF/services/org/apache/camel/dev-consoles.properties
deleted file mode 100644
index 00965f921d1..00000000000
---
a/components/camel-mllp/src/generated/resources/META-INF/services/org/apache/camel/dev-consoles.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-dev-consoles=mllp
-groupId=org.apache.camel
-artifactId=camel-mllp
-version=4.7.0-SNAPSHOT
-projectName=Camel :: MLLP
-projectDescription=Camel MLLP Component
diff --git
a/components/camel-netty/src/generated/resources/META-INF/services/org/apache/camel/dev-consoles.properties
b/components/camel-netty/src/generated/resources/META-INF/services/org/apache/camel/dev-consoles.properties
deleted file mode 100644
index f11e3873e6d..00000000000
---
a/components/camel-netty/src/generated/resources/META-INF/services/org/apache/camel/dev-consoles.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-# Generated by camel build tools - do NOT edit this file!
-dev-consoles=netty
-groupId=org.apache.camel
-artifactId=camel-netty
-version=4.7.0-SNAPSHOT
-projectName=Camel :: Netty
-projectDescription=Camel Netty NIO based socket communication component