activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject git commit: improving publishable address policy interface, so we can get the actual publish URI
Date Tue, 03 Sep 2013 16:05:07 GMT
Updated Branches:
  refs/heads/trunk 8320e66b5 -> a3a22efb2


improving publishable address policy interface, so we can get the actual publish URI


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/a3a22efb
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/a3a22efb
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/a3a22efb

Branch: refs/heads/trunk
Commit: a3a22efb257c76794becc6de02186c7abfecc440
Parents: 8320e66
Author: Dejan Bosanac <dejan@nighttale.net>
Authored: Tue Sep 3 18:04:07 2013 +0200
Committer: Dejan Bosanac <dejan@nighttale.net>
Committed: Tue Sep 3 18:04:37 2013 +0200

----------------------------------------------------------------------
 .../org/apache/activemq/broker/PublishedAddressPolicy.java    | 7 +++++--
 .../java/org/apache/activemq/broker/TransportConnector.java   | 4 ++++
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/a3a22efb/activemq-broker/src/main/java/org/apache/activemq/broker/PublishedAddressPolicy.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/PublishedAddressPolicy.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/PublishedAddressPolicy.java
index 0814a41..9898482 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/PublishedAddressPolicy.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/PublishedAddressPolicy.java
@@ -60,7 +60,7 @@ public class PublishedAddressPolicy {
      * @return a string URI address that a client can use to connect to this Transport.
      * @throws Exception
      */
-    public String getPublishableConnectString(TransportConnector connector) throws Exception
{
+    public URI getPublishableConnectURI(TransportConnector connector) throws Exception {
 
         URI connectorURI = connector.getConnectUri();
 
@@ -79,8 +79,11 @@ public class PublishedAddressPolicy {
         String fragment = getPublishedFragmentValue(connectorURI.getFragment());
 
         URI publishedURI = new URI(scheme, userInfo, host, port, path, getClusterClientUriQuery(),
fragment);
+        return publishedURI;
+    }
 
-        return publishedURI.toString();
+    public String getPublishableConnectString(TransportConnector connector) throws Exception
{
+        return getPublishableConnectURI(connector).toString();
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/activemq/blob/a3a22efb/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
index f7036c7..b481864 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnector.java
@@ -262,6 +262,10 @@ public class TransportConnector implements Connector, BrokerServiceAware
{
         return publishableConnectString;
     }
 
+    public URI getPublishableConnectURI() throws Exception {
+        return publishedAddressPolicy.getPublishableConnectURI(this);
+    }
+
     @Override
     public void stop() throws Exception {
         ServiceStopper ss = new ServiceStopper();


Mime
View raw message