Package org.apache.activemq.broker
Class PublishedAddressPolicy
java.lang.Object
org.apache.activemq.broker.PublishedAddressPolicy
Policy object that controls how a TransportConnector publishes the connector's
address to the outside world. By default the connector will publish itself
using the resolved host name of the bound server socket.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the value of the published host value. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the URI query that's configured on the published URI that's sent to client's when the cluster info is updated.getPublishableConnectString(TransportConnector connector) getPublishableConnectURI(TransportConnector connector) Using the supplied TransportConnector this method returns the String that will be used to update clients with this connector's connect address.protected StringgetPublishedFragmentValue(String uriFragmentEntry) Subclasses can override what host value is published by implementing alternate logic for this method.protected StringgetPublishedHostValue(String uriHostEntry) Subclasses can override what host value is published by implementing alternate logic for this method.protected StringgetPublishedPathValue(String uriPathEntry) Subclasses can override what path value is published by implementing alternate logic for this method.protected StringgetPublishedUserInfoValue(String uriUserInfoEntry) Subclasses can override what user info value is published by implementing alternate logic for this method.voidsetClusterClientUriQuery(String clusterClientUriQuery) Sets the URI query that's configured on the published URI that's sent to client's when the cluster info is updated.voidsetHostMapping(Map<String, String> hostMapping) voidsetPortMapping(Map<Integer, Integer> portMapping) voidsetPublishedHostStrategy(String strategy) void
-
Constructor Details
-
PublishedAddressPolicy
public PublishedAddressPolicy()
-
-
Method Details
-
getPublishableConnectURI
Using the supplied TransportConnector this method returns the String that will be used to update clients with this connector's connect address.- Parameters:
connector- The TransportConnector whose address is to be published.- Returns:
- a string URI address that a client can use to connect to this Transport.
- Throws:
Exception
-
getPublishableConnectString
- Throws:
Exception
-
getPublishedHostValue
Subclasses can override what host value is published by implementing alternate logic for this method.- Parameters:
uriHostEntry-- Returns:
- the value published for the given host.
- Throws:
UnknownHostException
-
getPublishedPathValue
Subclasses can override what path value is published by implementing alternate logic for this method. By default this method simply returns what was already set as the Path value in the original URI.- Parameters:
uriPathEntry- The original value of the URI path.- Returns:
- the desired value for the published URI's path.
-
getPublishedFragmentValue
Subclasses can override what host value is published by implementing alternate logic for this method. By default this method simply returns what was already set as the Fragment value in the original URI.- Parameters:
uriFragmentEntry- The original value of the URI Fragment.- Returns:
- the desired value for the published URI's Fragment.
-
getPublishedUserInfoValue
Subclasses can override what user info value is published by implementing alternate logic for this method. By default this method simply returns what was already set as the UserInfo value in the original URI.- Parameters:
uriUserInfoEntry- The original value of the URI user info.- Returns:
- the desired value for the published URI's user info.
-
getClusterClientUriQuery
Gets the URI query that's configured on the published URI that's sent to client's when the cluster info is updated.- Returns:
- the clusterClientUriQuery
-
setClusterClientUriQuery
Sets the URI query that's configured on the published URI that's sent to client's when the cluster info is updated.- Parameters:
clusterClientUriQuery- the clusterClientUriQuery to set
-
getPublishedHostStrategy
- Returns:
- the publishedHostStrategy
-
setPublishedHostStrategy
- Parameters:
strategy- the publishedHostStrategy to set
-
setPublishedHostStrategy
- Parameters:
strategy- the publishedHostStrategy to set
-
setPortMapping
- Parameters:
portMapping- map the ports in restrictive environments
-
getPortMapping
-
setHostMapping
- Parameters:
hostMapping- map the resolved hosts
-
getHostMapping
-