You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/07/25 13:55:30 UTC
[3/7] camel git commit: CAMEL-8526: Add more EIP as specialized mbeans
CAMEL-8526: Add more EIP as specialized mbeans
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a7a613b6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a7a613b6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a7a613b6
Branch: refs/heads/master
Commit: a7a613b622aab5dc45b1a7e0f1aa590b85745b5b
Parents: 15da595
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Jul 25 10:25:32 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Jul 25 13:59:38 2015 +0200
----------------------------------------------------------------------
.../camel/management/mbean/ManagedEndpointRegistry.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/a7a613b6/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java
index 98d6524..573fa91 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpointRegistry.java
@@ -29,7 +29,9 @@ import org.apache.camel.api.management.ManagedResource;
import org.apache.camel.api.management.mbean.CamelOpenMBeanTypes;
import org.apache.camel.api.management.mbean.ManagedEndpointRegistryMBean;
import org.apache.camel.spi.EndpointRegistry;
+import org.apache.camel.spi.ManagementStrategy;
import org.apache.camel.util.ObjectHelper;
+import org.apache.camel.util.URISupport;
/**
* @version
@@ -37,12 +39,18 @@ import org.apache.camel.util.ObjectHelper;
@ManagedResource(description = "Managed EndpointRegistry")
public class ManagedEndpointRegistry extends ManagedService implements ManagedEndpointRegistryMBean {
private final EndpointRegistry endpointRegistry;
+ private boolean sanitize;
public ManagedEndpointRegistry(CamelContext context, EndpointRegistry endpointRegistry) {
super(context, endpointRegistry);
this.endpointRegistry = endpointRegistry;
}
+ public void init(ManagementStrategy strategy) {
+ super.init(strategy);
+ sanitize = strategy.getManagementAgent().getMask() != null ? strategy.getManagementAgent().getMask() : false;
+ }
+
public EndpointRegistry getEndpointRegistry() {
return endpointRegistry;
}
@@ -79,6 +87,9 @@ public class ManagedEndpointRegistry extends ManagedService implements ManagedEn
for (Endpoint endpoint : endpoints) {
CompositeType ct = CamelOpenMBeanTypes.listEndpointsCompositeType();
String url = endpoint.getEndpointUri();
+ if (sanitize) {
+ url = URISupport.sanitizeUri(url);
+ }
boolean fromStatic = endpointRegistry.isStatic(url);
boolean fromDynamic = endpointRegistry.isDynamic(url);