Package com.atlassian.bamboo.setup
Class BrokerURIUtils
- java.lang.Object
-
- com.atlassian.bamboo.setup.BrokerURIUtils
-
public class BrokerURIUtils extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BrokerURIUtils.MergeMode
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull URI
addGlobalFailoverParameters(@NotNull URI brokerURI, @NotNull String failoverParams, @NotNull BrokerURIUtils.MergeMode mergeMode)
Method to add parameters to the broker client URI.static @NotNull URI
addParametersToEachFailoverTransport(@NotNull URI brokerURI, @NotNull String failoverTransportsParams, @NotNull BrokerURIUtils.MergeMode mergeMode)
Method to add parameters to the broker client URI.static URI
addParametersToFailoverTransport(@NotNull URI brokerURI, @NotNull String protocol, @NotNull String failoverTransportsParams, @NotNull BrokerURIUtils.MergeMode mergeMode)
static URI
changeUriIpAddress(@NotNull URI uri, @NotNull String newIpAddress)
static URI
decorateBrokerClientURI(URI brokerURI)
static URI
decorateBrokerURI(URI brokerURI)
Decorates a supplied ActiveMQ broker URI with default options.static URI
decorateBrokerURI(URI brokerURI, List<String> paramsToPropagate)
static @NotNull String
generateBrokerClientURI(String brokerConnectionAddress)
static Map<String,String>
parseQuery(@Nullable String query)
static @NotNull URI
removeParameter(@NotNull URI brokerURI, @NotNull String paramToRemove)
Method to remove a parameter from the broker URI.
-
-
-
Method Detail
-
removeParameter
@NotNull public static @NotNull URI removeParameter(@NotNull @NotNull URI brokerURI, @NotNull @NotNull String paramToRemove)
Method to remove a parameter from the broker URI. Handles removal of params failover: composite params as well- Parameters:
brokerURI
-paramToRemove
-- Returns:
-
changeUriIpAddress
public static URI changeUriIpAddress(@NotNull @NotNull URI uri, @NotNull @NotNull String newIpAddress) throws URISyntaxException
- Throws:
URISyntaxException
-
addGlobalFailoverParameters
@NotNull public static @NotNull URI addGlobalFailoverParameters(@NotNull @NotNull URI brokerURI, @NotNull @NotNull String failoverParams, @NotNull @NotNull BrokerURIUtils.MergeMode mergeMode)
Method to add parameters to the broker client URI.- Parameters:
brokerURI
-failoverParams
-- Returns:
-
addParametersToEachFailoverTransport
@NotNull public static @NotNull URI addParametersToEachFailoverTransport(@NotNull @NotNull URI brokerURI, @NotNull @NotNull String failoverTransportsParams, @NotNull @NotNull BrokerURIUtils.MergeMode mergeMode)
Method to add parameters to the broker client URI.- Parameters:
brokerURI
-failoverTransportsParams
-- Returns:
-
addParametersToFailoverTransport
public static URI addParametersToFailoverTransport(@NotNull @NotNull URI brokerURI, @NotNull @NotNull String protocol, @NotNull @NotNull String failoverTransportsParams, @NotNull @NotNull BrokerURIUtils.MergeMode mergeMode)
-
parseQuery
public static Map<String,String> parseQuery(@Nullable @Nullable String query) throws URISyntaxException
- Throws:
URISyntaxException
-
decorateBrokerURI
public static URI decorateBrokerURI(URI brokerURI)
Decorates a supplied ActiveMQ broker URI with default options.
- Parameters:
brokerURI
- The broker URI to decorate- Returns:
- The decorated broker URI
-
decorateBrokerURI
public static URI decorateBrokerURI(URI brokerURI, List<String> paramsToPropagate)
-
generateBrokerClientURI
@NotNull public static @NotNull String generateBrokerClientURI(String brokerConnectionAddress) throws URISyntaxException
- Throws:
URISyntaxException
-
-