From 140daf436c936fae9f9d6d715d76ee9c72010bd2 Mon Sep 17 00:00:00 2001 From: James Strachan Date: Mon, 19 Jun 2006 12:33:07 +0000 Subject: [PATCH] applied patch from Jason Sherman for AMQ-753 to expose the remote connection address in JMX - many thanks! git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@415307 13f79535-47bb-0310-9956-ffa450edef68 --- .../activemq/transport/http/BlockingQueueTransport.java | 5 +++++ .../org/apache/activemq/transport/http/HttpTransport.java | 3 +-- .../apache/activemq/transport/http/HttpTransportSupport.java | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java b/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java index 876920a8d5..f219798eb9 100755 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/http/BlockingQueueTransport.java @@ -56,6 +56,11 @@ public class BlockingQueueTransport extends TransportSupport { } } + + public String getRemoteAddress() { + return "blockingQueue"; + } + protected void doStart() throws Exception { } diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java index b9674e958f..2f77b5db9a 100755 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransport.java @@ -120,8 +120,7 @@ public class HttpTransport extends HttpTransportSupport { } } } - - + // Implementation methods // ------------------------------------------------------------------------- diff --git a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java index f0d8e4b8bb..c1c6f2f690 100644 --- a/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java +++ b/activemq-optional/src/main/java/org/apache/activemq/transport/http/HttpTransportSupport.java @@ -41,6 +41,10 @@ public abstract class HttpTransportSupport extends TransportThreadSupport { // Properties // ------------------------------------------------------------------------- + public String getRemoteAddress() { + return remoteUrl.toString(); + } + public URI getRemoteUrl() { return remoteUrl; }