CAMEL-6910: Added missing attributes to xslt endpoint for JMX.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1218ef5e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1218ef5e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1218ef5e Branch: refs/heads/camel-2.12.x Commit: 1218ef5e8f31843377c2ac8bd8ec6f26ce370a64 Parents: a0f0d38 Author: Claus Ibsen <[email protected]> Authored: Mon Oct 28 15:28:16 2013 +0100 Committer: Claus Ibsen <[email protected]> Committed: Mon Oct 28 15:28:30 2013 +0100 ---------------------------------------------------------------------- .../org/apache/camel/component/xslt/XsltEndpoint.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/1218ef5e/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java index 6d1787f..aa91b1a 100644 --- a/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java +++ b/camel-core/src/main/java/org/apache/camel/component/xslt/XsltEndpoint.java @@ -58,6 +58,16 @@ public class XsltEndpoint extends ProcessorEndpoint { return cacheStylesheet; } + @ManagedAttribute(description = "Endpoint State") + public String getState() { + return getStatus().name(); + } + + @ManagedAttribute(description = "Camel ID") + public String getCamelId() { + return getCamelContext().getName(); + } + public XsltEndpoint findOrCreateEndpoint(String uri, String newResourceUri) { String newUri = uri.replace(resourceUri, newResourceUri); LOG.trace("Getting endpoint with URI: {}", newUri); @@ -73,7 +83,6 @@ public class XsltEndpoint extends ProcessorEndpoint { LOG.trace("{} set to {} creating new endpoint to handle exchange", XsltConstants.XSLT_RESOURCE_URI, newResourceUri); XsltEndpoint newEndpoint = findOrCreateEndpoint(getEndpointUri(), newResourceUri); newEndpoint.onExchange(exchange); - return; } else { if (!cacheStylesheet || cacheCleared) { loadResource(resourceUri);
