mirror of https://github.com/apache/activemq.git
improving publishable address policy interface, so we can get the actual publish URI
This commit is contained in:
parent
8320e66b5d
commit
a3a22efb25
|
@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue